Search found 127 matches

by Subeen
Mon Mar 01, 2004 2:22 pm
Forum: Bugs and suggestions
Topic: 511 - Do You Know the Way to San Jose? - Do nothing AC
Replies: 62
Views: 4821

I got WA in this problem. I used topological sort here. please test my program to find the bug. Here is the code: [c]#include <stdio.h> #include <string.h> void main() { int g[30][30]; int indegree[30]; int qara[1000], head, tail, sorted[30], taken[30]; char in[30], pre[30]; int i, j, u, flag=1, l, ...
by Subeen
Sun Feb 29, 2004 3:26 pm
Forum: Volume 101 (10100-10199)
Topic: 10137 - The Trip
Replies: 159
Views: 44827

everbody who r getting WA on this problem please consider the thing
who should get the extra pennies if the total does not divide evenly?
Hope it will help... :wink:
by Subeen
Thu Feb 26, 2004 12:33 pm
Forum: Volume 1 (100-199)
Topic: 113 - Power of Cryptography
Replies: 162
Views: 15532

use double instead of long double.

( double ldPower, ldResult; )
by Subeen
Mon Feb 23, 2004 3:28 pm
Forum: Volume 1 (100-199)
Topic: 195 - Anagram
Replies: 242
Views: 25578

harshahs, u can visit the following link for efficiently generating permutation.

http://www.cs.byuh.edu/~johnsonj/permut ... ubmit.html

u can also find a good algirhtm named generating fast sorted permutation in discrete mathematics book.
by Subeen
Tue Feb 17, 2004 8:49 am
Forum: C++
Topic: long long with printf
Replies: 5
Views: 2134

I also use %lld, but %lli should also work for long long integer, and %llu is for unsigned long long integer.
by Subeen
Thu Jan 29, 2004 7:22 am
Forum: Volume 101 (10100-10199)
Topic: 10115 - Automatic Editing
Replies: 29
Views: 9573

thanks. I got it AC after increasing array limit. but previous size should work according to the problem. char in[300]; char text[300], *p1, *p2, *p3; char rules[11][2][100]; but when I replace the above part with the following I got AC. char in[400]; char text[400], *p1, *p2, *p3; char rules[11][2]...
by Subeen
Thu Jan 29, 2004 7:06 am
Forum: C++
Topic: Standard output for C++
Replies: 1
Views: 1361

yes. cin and cout.
by Subeen
Wed Jan 28, 2004 1:00 pm
Forum: C++
Topic: a[++y]=a[y]+1;
Replies: 15
Views: 4799

I think:
printf("%d", cas++);
and
printf("%d", cas); cas++;
are same.
but
printf("%d", ++cas); is different!
by Subeen
Wed Jan 28, 2004 12:50 pm
Forum: Volume 101 (10100-10199)
Topic: 10115 - Automatic Editing
Replies: 29
Views: 9573

I am also getting WA. Someone please help me to find bug in my code.
[cpp]
code deleted...
[/cpp]
by Subeen
Tue Jan 27, 2004 8:48 am
Forum: Volume 104 (10400-10499)
Topic: 10425 - Mobile Destroyer
Replies: 13
Views: 5525

I am also getting WA. and now confused about the problem statement. :-? Is there any special trick in this problem? plz post some inputs/ouputs.
by Subeen
Tue Jan 27, 2004 7:54 am
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 23761

thanks, titid. after considering that case I got it AC :)
by Subeen
Sat Jan 24, 2004 9:25 am
Forum: Volume 100 (10000-10099)
Topic: 10067 - Playing with Wheels
Replies: 62
Views: 23761

I tried my best with this programming and getting WA. please help to find bug in my program.
[c]...code deleted...[/c]
by Subeen
Sat Jan 10, 2004 7:24 am
Forum: Volume 103 (10300-10399)
Topic: 10394 - Twin Primes
Replies: 101
Views: 31861

I am getting RTE in my program. Please help me to find my bug. Here is my code: [c]#include <stdio.h> #include <math.h> const int max = 20000000; char p[2500100]; #define isprime(n) (p[n/8] & (1<<(7-n % 8 ))) void seive() { int i,j; for(i=3; i<=max; i+=2) p[i/8] = p[i/8]|(1<<7-i % 8 ); int lim = sqr...
by Subeen
Sun Nov 23, 2003 8:36 am
Forum: Volume 3 (300-399)
Topic: 392 - Polynomial Showdown
Replies: 93
Views: 17669

increase the size of your vector

u declared vector[9]
and used loop for(i=2; i<=9; i++).
that's the problem.
by Subeen
Sun Nov 09, 2003 9:33 am
Forum: Volume 101 (10100-10199)
Topic: 10160 - Servicing Stations
Replies: 20
Views: 13189

I am getting time limit exceeded using exhaustive search ( recursive ). How to do it faster?

Go to advanced search