## Search found 405 matches

Sun Aug 08, 2004 9:12 pm
Forum: Volume 106 (10600-10699)
Topic: 10685 - Nature
Replies: 41
Views: 18304

Can anyone please tell me why the code is getting TLE? I used the same code for "10608 friends".

Here is the code...

Code: Select all

``````removed after ac
``````
Sun Aug 08, 2004 8:58 pm
Forum: Volume 106 (10600-10699)
Topic: 10684 - The jackpot
Replies: 34
Views: 19170
My algo is as following: let pre=previous profit. max=maximum profit then for a single input number a if pre+a>0 pre=pre+a; else pre=0; if(pre+a>max) max=pre+a; print just max. I think this will help you getting wrong part of your algorithm and any two for loop system will get Tle (i think). So use ...
Tue Jul 20, 2004 1:11 pm
Forum: Volume 106 (10600-10699)
Replies: 23
Views: 15939

Hello Yarin, You told that you had tested my solution. But After changing the limit I got 504 for your inout. So, there be aything wrong. Please help.
Mon Jul 19, 2004 5:03 pm
Forum: Volume 106 (10600-10699)
Topic: 10667 - Largest Block
Replies: 12
Views: 7525

Accepted using O(n^3) algorithm. But, prev. algo was WA. What am I missing above?
Anupam
Mon Jul 19, 2004 4:18 pm
Forum: Volume 106 (10600-10699)
Topic: 10667 - Largest Block
Replies: 12
Views: 7525
I applied your code as stated above, but getting WA. Here it is. Please check whether there is a simole mistake. #include<stdio.h> #define N 120 main() { int cas,z,a[N][N],b,n,i,j,r1,r2,c1,c2,h[N][N],l[N][N],r[N][N],y,max; freopen("in.txt","r",stdin); scanf("%d",&cas); for(z=0;z<cas;z++) { scanf("%d...
Sat Jul 17, 2004 6:33 pm
Forum: Volume 104 (10400-10499)
Topic: 10433 - Automorphic Numbers
Replies: 41
Views: 23685
send me your pascal program also.
Sat Jul 17, 2004 6:33 pm
Forum: Algorithms
Topic: Help With USACO Problem
Replies: 13
Views: 3252
Thu Jul 15, 2004 5:05 pm
Forum: Volume 104 (10400-10499)
Topic: 10433 - Automorphic Numbers
Replies: 41
Views: 23685
I don't face any problem with c++.
In c++ you can ac the program by having an array of 2500 dig and then by searching the array only.
Just a code of 5 lines I think:-)

BTW, would you plz mention the problem you faced with c++?
--
Fri Jul 09, 2004 3:04 pm
Forum: Algorithms
Topic: Help With USACO Problem
Replies: 13
Views: 3252
Well Mehdi bhai, tried in that way. But, MLE and the other is TLE. Now, trying by sorting the coordinates.
Fri Jul 09, 2004 2:59 pm
Forum: Volume 104 (10400-10499)
Topic: 10487 - Closest Sums
Replies: 89
Views: 30804
Oops! Thank you for such input jamu. Correcting the mistakes.
Mon Jul 05, 2004 3:45 pm
Forum: Algorithms
Topic: Aho/Corasick
Replies: 2
Views: 1594
Thank you Gawry(Indian prob.?) for such a good book.
Mon Jul 05, 2004 3:37 pm
Forum: Algorithms
Topic: Help With USACO Problem
Replies: 13
Views: 3252
Hello, I am also sufferer for the problem. and, so posted in another thread. Watch it and help.
Sat Jul 03, 2004 5:52 pm
Forum: Volume 106 (10600-10699)
Replies: 23
Views: 15939
Hello Yarin, I think my array of only five was too lttle because there is an entry like a[..][nf+1][..]. But, would you please mention what you meant by too small array? BTW, Nice problem. and, my program gives 504 after extending the array. which means prob. I am missing something. Prob. in the ini...
Sat Jul 03, 2004 8:20 am
Forum: Algorithms
Topic: help with one "usaco hard problem" ... please.....
Replies: 19
Views: 9755
how to normalize the coordinates?
Anupam
Sat Jul 03, 2004 8:19 am
Forum: Volume 106 (10600-10699)
Topic: 10625 - GNU = GNU'sNotUnix
Replies: 16
Views: 8831
I have applied simulation to solve it. But, I think, there is a mathemetical solution(purely) to the problem. Would you please explain the mathematical way please??
Anupam