Search found 43 matches

by chetan
Fri Aug 10, 2007 1:59 pm
Forum: Volume 112 (11200-11299)
Topic: 11254 - Consecutive Integers
Replies: 24
Views: 11700

is my approach right ????
by chetan
Sat Aug 04, 2007 5:26 pm
Forum: Volume 112 (11200-11299)
Topic: 11254 - Consecutive Integers
Replies: 24
Views: 11700

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 :(
by chetan
Sat Aug 04, 2007 1:23 pm
Forum: Volume 112 (11200-11299)
Topic: 11254 - Consecutive Integers
Replies: 24
Views: 11700

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);...
by chetan
Sat Aug 04, 2007 1:03 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18558

plz help me ........... y WA ????
:cry: :cry: :cry:
by chetan
Wed Aug 01, 2007 8:34 am
Forum: Volume 5 (500-599)
Topic: 572 - Oil Deposits
Replies: 39
Views: 16176

for the following i/p should i print 1 or 0 ???

Code: Select all

1 1
@
0 0
by chetan
Wed Aug 01, 2007 8:24 am
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18558

now i am getting WA with my code .
plz help

(have posted the WA code above) :cry: :cry: :cry: :cry:
by chetan
Tue Jul 31, 2007 6:17 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18558

have posted working code now.
pls help me out.
by chetan
Tue Jul 31, 2007 5:12 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18558

when exactly doesnt it return ???
could you please give me a test case for that
thanks
:)
by chetan
Tue Jul 31, 2007 7:18 am
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18558

what r the limits for this problem ????
i think many ppl have solved this using dfs
by chetan
Mon Jul 30, 2007 12:43 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18558

still cant figure out :cry: :cry: :cry: :cry: :cry:
by chetan
Mon Jul 30, 2007 12:14 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18558

what is the reason for RE ???
:cry: :cry:
please help me
by chetan
Sun Jul 29, 2007 8:28 pm
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18558

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(...
by chetan
Tue Jul 17, 2007 4:49 am
Forum: Volume 2 (200-299)
Topic: 227 - Puzzle
Replies: 56
Views: 9267

please give me some test cases
by chetan
Mon Jul 16, 2007 7:28 pm
Forum: Volume 2 (200-299)
Topic: 227 - Puzzle
Replies: 56
Views: 9267

why WA ????? :cry: :cry:

Code: Select all


CODE DELETED 

by chetan
Mon Jul 16, 2007 8:29 am
Forum: Volume 3 (300-399)
Topic: 389 - Basically Speaking
Replies: 94
Views: 22625

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 ????

Go to advanced search