Search found 106 matches

by sapnil
Thu Nov 01, 2007 4:32 am
Forum: Volume 108 (10800-10899)
Topic: 10815 - Andy's First Dictionary
Replies: 116
Views: 30249

To alamgir

Input this case:

Code: Select all

     aaa     a

>> your code given some garbage output


Thanks
Keep posting
Sapnil
by sapnil
Sun Oct 28, 2007 5:23 pm
Forum: Volume 100 (10000-10099)
Topic: 10062 - Tell me the frequencies!
Replies: 235
Views: 35828

To alamgir

-> Your code given output for '\n'

Hope it helps.

** plz remove your code after acc.

Thanks
Keep posting
Sapnil
by sapnil
Sun Oct 28, 2007 4:00 pm
Forum: Volume 5 (500-599)
Topic: 543 - Goldbach's Conjecture
Replies: 109
Views: 23600

-> give up intilize
-> Generate pair for each input number

-> I think you get TLE because you generate output for each num from
1 to 1000000.


Thanks
Keep Posting
Sapnil
by sapnil
Sun Oct 28, 2007 3:07 pm
Forum: Volume 113 (11300-11399)
Topic: 11330 - Andy's Shoes
Replies: 10
Views: 5719

WR WR WR WR...

I get too many WR Can any one help me,plz................. Here my code. #include<stdio.h> #include<stdlib.h> #include<math.h> #include<stdlib.h> #define CSE 10090 struct SS { long x,y; }; SS Loc[CSE]; bool Flag[CSE]; long a[CSE*2]; void Init(long n) { long i; for(i=0;i<=n;i++) { Flag[i]=1; } return...
by sapnil
Fri Oct 26, 2007 6:37 pm
Forum: Volume 102 (10200-10299)
Topic: 10200 - Prime Time
Replies: 202
Views: 60523

Try this cases

Code: Select all

1 10000
1 1
2 2
1 2
output:
41.48
100.00
100.00
100.00
Thanks
Keep posting
Sapnil
by sapnil
Fri Oct 26, 2007 4:07 pm
Forum: Volume 1 (100-199)
Topic: 100 - The 3n + 1 problem
Replies: 1394
Views: 179793

To sumon

Just change this line:

Code: Select all

while(n!=1)
to
while(n>1)
Thanks
Keep posting
Sapnil
by sapnil
Fri Oct 26, 2007 5:24 am
Forum: Volume 6 (600-699)
Topic: 677 - All Walks of length "n" from the first node
Replies: 17
Views: 8007

To sabir,
you may miss this line.

Code: Select all

In case there are not walks of length n, just print `no walk of length n'
Thanks
Keep posting
Sapnil
by sapnil
Fri Oct 26, 2007 5:14 am
Forum: Volume 7 (700-799)
Topic: 776 - Monkeys in a Regular Forest
Replies: 51
Views: 18405

776 PE to WR

Hi
At first i get PE,but now i get WR.
I test all the test cases of board.
Plz Help me.............

Code: Select all


// Delete after ACC

Thanks
Keep posting
Sapnil
by sapnil
Tue Oct 23, 2007 4:41 pm
Forum: Volume 113 (11300-11399)
Topic: 11321 - Sort! Sort!! and Sort!!!
Replies: 50
Views: 20117

Try This cases
Input:
6 5
10
20
30
50
60
70
6 5
5
15
25
35
45
55
6 5
5
10
15
20
25
30
0 0
Output:
6 5
10
20
30
50
60
70
6 5
55
45
35
25
15
5
6 5
25
15
5
10
20
30
0 0
Thanks
Keep posting
Sapnil
by sapnil
Tue Oct 23, 2007 2:56 pm
Forum: Volume 113 (11300-11399)
Topic: 11317 - GCD+LCM
Replies: 16
Views: 5937

To Sunny

Thank u sunny,its really Help me.

Thanks
Keep posting
Sapnil
by sapnil
Mon Oct 22, 2007 1:59 pm
Forum: Volume 113 (11300-11399)
Topic: 11317 - GCD+LCM
Replies: 16
Views: 5937

To sunny

I can't get your point...
can u describe me more?

Thanks
Keep posting
Sapnil
by sapnil
Mon Oct 22, 2007 10:51 am
Forum: Volume 113 (11300-11399)
Topic: 11321 - Sort! Sort!! and Sort!!!
Replies: 50
Views: 20117

Yes use qsort function of C;
>> Just modified this function &
make sure that it alyaws return integer.

Thanks
Keep posting
Sapnil
by sapnil
Sun Oct 21, 2007 1:28 pm
Forum: Volume 100 (10000-10099)
Topic: 10025 - The ? 1 ? 2 ? ... ? n = k problem
Replies: 42
Views: 11592

Cheque this cases

Code: Select all

Input:
11
1000000000
-1000000000
999999999
-999999999
9999999
-999999
0
1
-1
2
-2
Output:
44723

44723

44721

44721

4473

1414

3

1

1

3

3
Thanks
Keep posting
Sapnil
by sapnil
Sun Oct 21, 2007 1:16 pm
Forum: Volume 7 (700-799)
Topic: 762 - We Ship Cheap
Replies: 51
Views: 19880

I get acc by taking 1009 node(array size is 1009)
plz make sure it...

Thanks
Keep posting
Sapnil
by sapnil
Sat Oct 20, 2007 11:58 am
Forum: Volume 4 (400-499)
Topic: 429 - Word Transformation
Replies: 82
Views: 16696

Hi i am trying with BFS,but WR
Is there any tricky case?

Thanks
Keep posting
Sapnil

Go to advanced search