Search found 9 matches
- Fri Nov 04, 2011 9:32 am
- Forum: Volume 117 (11700-11799)
- Topic: 11716 - Digital Fortress
- Replies: 39
- Views: 12026
Re: 11716 - Digital Fortress
length=strlen(arr); root=sqrt(length); if(floor(root)==ceil(root)) if I am not wrong, i think your are checking if the length is a perfect square. its better if you do it like this if(root*root==length) its better to use printf instead of putchar,also use int main() and return 0; instead of saving ...
- Fri Sep 16, 2011 7:13 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10310 - Dog and Gopher
- Replies: 47
- Views: 18344
Re: 10310 - Dog and Gopher
using scanf is a better option since scanf is said to faster than cin !
and reading until EOF is a factor...while(scanf("%d",&N)!=EOF) can help
and reading until EOF is a factor...while(scanf("%d",&N)!=EOF) can help

- Fri Sep 16, 2011 1:45 pm
- Forum: Volume 122 (12200-12299)
- Topic: 12250 - Language Detection
- Replies: 6
- Views: 2631
Re: WA in Language Detection 12250
Stil getting WA.
shall i just print UNKNOWN without cases number? if yes, then shall the cases number increment?
shall i just print UNKNOWN without cases number? if yes, then shall the cases number increment?
- Wed Sep 14, 2011 3:02 pm
- Forum: Volume 122 (12200-12299)
- Topic: 12250 - Language Detection
- Replies: 6
- Views: 2631
12250 - Language Detection
For some unknown reasons, I'm getting WA in this problem.
Can anybody explain what may be the possible reasons of getting WA in this problem?
Thanks
Can anybody explain what may be the possible reasons of getting WA in this problem?
Thanks

- Fri Apr 08, 2011 11:36 am
- Forum: Volume 109 (10900-10999)
- Topic: 10925 - Krakovia
- Replies: 50
- Views: 22840
Re: 10925 - Krakovia
my code gives correct output sometimes also wrong output for the same test cases. i dunno what's wrong with it and why it is showing such a strange behavior. please help. thanks #include <stdio.h> #include <string.h> char res[1000]; int main() { int N,F,i,j,k,len,lim,high,sum,carry,p,m,n,v,quo,flag,...
- Thu Mar 31, 2011 1:43 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10179 - Irreducible Basic Fractions
- Replies: 28
- Views: 10413
Re: 10179 - Irreducible Basic Fractions
When i run the loop upto sqrt(n) i get WA because not all the prime factors are below sqrt(n) for example 123456. But when i do it upto n/2, i get TLE. Please help. Thanks #include <stdio.h> #include <math.h> char prime[1000000000]; int main() { long long n,prod,i,j,k; long long d; for(i=2; i<10000;...
- Fri Feb 18, 2011 6:22 pm
- Forum: Volume 117 (11700-11799)
- Topic: 11716 - Digital Fortress
- Replies: 39
- Views: 12026
Re: 11716 - Digital Fortress
getting WA too!! no idea where's the problem.

Code: Select all
removed after AC

- Thu Feb 10, 2011 8:01 am
- Forum: Volume 119 (11900-11999)
- Topic: 11909 - Soya Milk
- Replies: 15
- Views: 6810
11909 - Soya Milk
I am getting WA for this problem. I get the exact ans for the sample I/O.
plz help.
plz help.
- Fri Dec 17, 2010 8:25 pm
- Forum: Volume 118 (11800-11899)
- Topic: 11878 - Homework Checker
- Replies: 23
- Views: 9445
Re: 11878 - Homework Checker
i am getting WA for this problem.
here's my code,large though. please help!!
here's my code,large though. please help!!
Code: Select all
removed after AC :D