## Search found 43 matches

Fri Aug 10, 2007 1:59 pm
Forum: Volume 112 (11200-11299)
Topic: 11254 - Consecutive Integers
Replies: 24
Views: 11589
is my approach right ????
Sat Aug 04, 2007 5:26 pm
Forum: Volume 112 (11200-11299)
Topic: 11254 - Consecutive Integers
Replies: 24
Views: 11589
i have changed the for loop to

Code: Select all

``````
for(long long i=1;i*i<=2*x;i++)

``````
but now i get WA
Sat Aug 04, 2007 1:23 pm
Forum: Volume 112 (11200-11299)
Topic: 11254 - Consecutive Integers
Replies: 24
Views: 11589

### 11254 - Consecutive Integers

hi all. why TLE ???? # include <iostream> # include <cmath> using namespace std; int main() { long long x; while(cin>>x) { if(x==-1) return 0; if(x == 0){ cout<<"0 = 0 + ... + 0\n"; continue; } unsigned long long c = x*2; for(long long i=1;i<=x;i++) { long long b = 2*i-1; double y = sqrt(b*b + 4*c);...
Sat Aug 04, 2007 1:03 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18384
plz help me ........... y WA ????
Wed Aug 01, 2007 8:34 am
Forum: Volume 5 (500-599)
Topic: 572 - Oil Deposits
Replies: 39
Views: 15947
for the following i/p should i print 1 or 0 ???

Code: Select all

``````1 1
@
0 0
``````
Wed Aug 01, 2007 8:24 am
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18384
now i am getting WA with my code .
plz help

(have posted the WA code above)
Tue Jul 31, 2007 6:17 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18384
have posted working code now.
pls help me out.
Tue Jul 31, 2007 5:12 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18384
when exactly doesnt it return ???
could you please give me a test case for that
thanks
Tue Jul 31, 2007 7:18 am
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18384
what r the limits for this problem ????
i think many ppl have solved this using dfs
Mon Jul 30, 2007 12:43 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18384
still cant figure out
Mon Jul 30, 2007 12:14 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18384
what is the reason for RE ???

Sun Jul 29, 2007 8:28 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18384
why RE ??? # include <iostream> # include <algorithm> # include <cstring> # include <cstdlib> # include <cstdio> using namespace std; char arr[1010][1010]; int r,c,seen[1010][1010]; void ff(int i,int j,int n,char x) { arr[i][j]=n; seen[i][j]=1; //up if(i-1>=0 && arr[i-1][j]==x && ! seen[i-1][j]) ff(...
Tue Jul 17, 2007 4:49 am
Forum: Volume 2 (200-299)
Topic: 227 - Puzzle
Replies: 56
Views: 8844
please give me some test cases
Mon Jul 16, 2007 7:28 pm
Forum: Volume 2 (200-299)
Topic: 227 - Puzzle
Replies: 56
Views: 8844
why WA ?????

Code: Select all

``````
CODE DELETED

``````
Mon Jul 16, 2007 8:29 am
Forum: Volume 3 (300-399)
Topic: 389 - Basically Speaking
Replies: 94
Views: 22121
well i got AC . but again time is very bad 1.4 s
as far as implementation goes i use a look up table. thats much faster.
should i go in for optimizations or is there any other algo available ????