Search found 9 matches

by Pro.metal
Fri Nov 04, 2011 9:32 am
Forum: Volume 117 (11700-11799)
Topic: 11716 - Digital Fortress
Replies: 39
Views: 11115

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 ...
by Pro.metal
Fri Sep 16, 2011 7:13 pm
Forum: Volume 103 (10300-10399)
Topic: 10310 - Dog and Gopher
Replies: 47
Views: 17361

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 :wink:
by Pro.metal
Fri Sep 16, 2011 1:45 pm
Forum: Volume 122 (12200-12299)
Topic: 12250 - Language Detection
Replies: 6
Views: 2307

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?
by Pro.metal
Wed Sep 14, 2011 3:02 pm
Forum: Volume 122 (12200-12299)
Topic: 12250 - Language Detection
Replies: 6
Views: 2307

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 :)
by Pro.metal
Fri Apr 08, 2011 11:36 am
Forum: Volume 109 (10900-10999)
Topic: 10925 - Krakovia
Replies: 50
Views: 21585

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,...
by Pro.metal
Thu Mar 31, 2011 1:43 pm
Forum: Volume 101 (10100-10199)
Topic: 10179 - Irreducible Basic Fractions
Replies: 28
Views: 9771

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;...
by Pro.metal
Fri Feb 18, 2011 6:22 pm
Forum: Volume 117 (11700-11799)
Topic: 11716 - Digital Fortress
Replies: 39
Views: 11115

Re: 11716 - Digital Fortress

getting WA too!! no idea where's the problem.

Code: Select all

removed after AC

:D
by Pro.metal
Thu Feb 10, 2011 8:01 am
Forum: Volume 119 (11900-11999)
Topic: 11909 - Soya Milk
Replies: 15
Views: 6428

11909 - Soya Milk

I am getting WA for this problem. I get the exact ans for the sample I/O.
plz help.
by Pro.metal
Fri Dec 17, 2010 8:25 pm
Forum: Volume 118 (11800-11899)
Topic: 11878 - Homework Checker
Replies: 23
Views: 8590

Re: 11878 - Homework Checker

i am getting WA for this problem.
here's my code,large though. please help!!

Code: Select all

removed after AC :D

Go to advanced search