## Search found 140 matches

Wed Jun 12, 2019 1:27 pm
Forum: Volume 101 (10100-10199)
Topic: 10104 - Euclid Problem
Replies: 29
Views: 9483

### Re: 10104 - Euclid Problem

#include <iostream> #include <cstdio> #include <vector> #include <string> #include <map> #include <set> #include <stack> #include <queue> #include <iomanip> using namespace std; int gcd(int a, int b) { long s, t,mx,mn,dv,md,res,p,q,s2,t2; s = 1; t = 0; s2 = 0; t2 = 1; if (a > b) { mx = a; mn = b; }...
Mon Mar 07, 2016 7:34 am
Forum: FAQ
Topic: Can anyone change my username?
Replies: 0
Views: 4317

### Can anyone change my username?

Mon Mar 07, 2016 7:27 am
Forum: General
Topic: Can anyone change my username?
Replies: 0
Views: 4394

### Can anyone change my username?

Sat Apr 12, 2014 5:04 am
Forum: Volume 118 (11800-11899)
Topic: 11834 - Elevator
Replies: 11
Views: 4329

### Re: 11834 - Elevator

brianfry713 wrote:http://apps.topcoder.com/forums/?module ... 66&start=0
Try solving it without using floating point.
I am still not understanding the case of 45 degree. Can you please explain more with picture/figure/photo ? And where i am doing the mistake in code?
Fri Apr 11, 2014 5:26 am
Forum: Volume 118 (11800-11899)
Topic: 11834 - Elevator
Replies: 11
Views: 4329

### Re: 11834 - Elevator

brianfry713 wrote:Doesn't match the sample I/O.
See: http://acm.uva.es/board/viewtopic.php?t=50729
Try using double instead of float.
I have read that thread and re-read the problem, but could not understand it. Can you please explain more about the cases of the problem, specially the diagonal case with picutre?
Thu Apr 10, 2014 4:53 am
Forum: Volume 118 (11800-11899)
Topic: 11834 - Elevator
Replies: 11
Views: 4329

### 11834 - Elevator

#include <cstdlib> #include <cstdio> #include <cmath> #include <iostream> using namespace std; int main(int argc, char** argv) { //freopen("in.txt","r",stdin); int L,C,R1,R2,sum_of_radi,min; double angle_line; while(scanf("%d %d %d %d",&L,&C,&R1,&R2)) { if(L+C+R1+R2==0) break; sum_of_radi=R1+R2; if...
Mon Apr 15, 2013 12:12 am
Forum: General
Topic: How can i get the source code I have solved?
Replies: 4
Views: 7702

### How can i get the source code I have solved?

Hi,

How can i get the source code I have solved and submitted there http://uva.onlinejudge.org/?
Suppose i have deleted the source code from hard disk, now i need to see the source code of that problem and review it.
How can i retrieve the source code from http://uva.onlinejudge.org/ ?

Thanks.
Fri Sep 28, 2012 9:59 am
Forum: Volume 109 (10900-10999)
Topic: 10936 - Land surveyor's job
Replies: 10
Views: 6212

### Re: 10936 - Land surveyor's job

What's wrong with this code? #include<cstdio> #include<cmath> #include<cctype> #include<cstring> struct point { double angle,distance; }; int main() { int n,i,j,L; char s[15]; double pi=2*acos(0.0),degree,minute,second,angle,x1,y1,x2,y2,xt,yt,total; point A[1000]; for(;;) { scanf("%d",&n); if(n==0) ...
Fri Apr 06, 2012 6:02 pm
Forum: Algorithms
Topic: Can anyone explain maximum subarray 2D with example?
Replies: 1
Views: 3444

### Can anyone explain maximum subarray 2D with example?

Hi, Can anyone describe/elaborate the maximum subarray 2D algorithm with example? Here is a sample input output of a problem ( http://uva.onlinejudge.org/external/108/10827.html ) Input: 2 5 1 -1 0 0 -4 2 3 -2 -3 2 4 1 -1 5 0 3 -2 1 -3 2 -3 2 4 1 -4 3 1 2 3 4 5 6 7 8 9 Output: 15 45 I have searched ...
Thu Jun 17, 2010 6:51 pm
Forum: Volume 117 (11700-11799)
Replies: 32
Views: 5752

### Re: 11723 - Numbering Roads

yan yan wrote:try this:

Code: Select all

``5 8``
i think output should be

Code: Select all

``Case 1: 0``
I also did this still wrong answer.
Can someone post some input output?
Wed Jun 16, 2010 1:52 pm
Forum: Volume 117 (11700-11799)
Replies: 32
Views: 5752

### Re: 11723 - Numbering Roads

Can someone give some hint for this problem? Can't understand how the result is 1 for input 8 5 you can named 8 streets: 1 2 3 4 5 1A 2A 3A ! So, you only need one suffix! :) I did the same thing.But still wrong answer. Code: #include<iostream> #include<cstdio> #include<vector> #include<string> #in...
Wed Jun 16, 2010 7:14 am
Forum: Volume 117 (11700-11799)
Replies: 32
Views: 5752

### Re: 11723 - Numbering Roads

Code: testCase=1; while(scanf("%d %d",&a,&b)==2){ if(a+b==0){ break; } printf("Case %d: ",testCase); save=a-b; t=save/b; g=save%b; if(t>26){ printf("impossible\n"); testCase++; continue; } if(g==0){ printf("%d\n",t); testCase++; continue; } printf("%d\n",t+1); testCase++; }
Tue Jun 15, 2010 7:07 pm
Forum: Volume 117 (11700-11799)
Replies: 32
Views: 5752

Can someone give some hint for this problem?
Can't understand how the result is 1 for input 8 5
Sat Jun 12, 2010 7:15 pm
Forum: Volume 9 (900-999)
Replies: 68
Views: 31398

### Re: 902 - Password Search

Accepted.
A little mistake.
i<=(l-N) would be i<(l-N) and got ACC.
Sat Jun 12, 2010 3:41 pm
Forum: Volume 9 (900-999)