Search found 7 matches

by ajmer
Sat Jun 15, 2013 5:22 am
Forum: Volume 118 (11800-11899)
Topic: 11800 - Determine the Shape
Replies: 47
Views: 13233

Re: 11800 - Determine the Shape

I'm getting WA even though all of the input I was checking gave the same output as accepted codes. Can someone explain what's wrong or give me some nasty inputs that give wrong outputs? Quick reply would be really appreciated. #include <stdio.h> #include <stdbool.h> struct point { int x,y; }; struct...
by ajmer
Sun Apr 14, 2013 10:34 pm
Forum: Volume 109 (10900-10999)
Topic: 10927 - Bright Lights
Replies: 26
Views: 13858

Re: 10927 - Bright lights

If I just compare every two points to see whether one covers another, will I get TLE?

Also, does output need to be sorted in some way or may be just printed in a random order?
by ajmer
Sun Mar 10, 2013 6:42 pm
Forum: Volume 105 (10500-10599)
Topic: 10589 - Area
Replies: 48
Views: 18318

Re: 10589 - Area

But now I don't know why I'm getting WA. Am I using a wrong algorithm? Thanks in advance. Code in C. #include <stdio.h> int main() { int n,a,m,i; double x,y,p,odla,odlb,odlc,odld; scanf("%d %d",&n,&a); while (n!=0) { m=0; for (i=0;i<n;i++) { scanf("%lf %lf",&x,&y); odla=x*x+y*y; odlb=(x-a)*(x-a)+y*y...
by ajmer
Sun Mar 10, 2013 5:58 pm
Forum: Volume 105 (10500-10599)
Topic: 10589 - Area
Replies: 48
Views: 18318

Re: 10589 - Area

Wow, how did I forget about that, thanks.
by ajmer
Fri Mar 08, 2013 2:20 am
Forum: Volume 119 (11900-11999)
Topic: 11995 - I Can Guess the Data Structure!
Replies: 60
Views: 7329

Re: 11995 - I Can Guess the Data Structure!

Altought only one test case gave incorrect output, it made me realise quite a few errors in code, so thanks for that. Got AC now.
by ajmer
Fri Mar 08, 2013 1:30 am
Forum: Volume 105 (10500-10599)
Topic: 10589 - Area
Replies: 48
Views: 18318

Re: 10589 - Area

Why am I getting runtime error? Code in C. Thanks for help.

Code: Select all

solved
by ajmer
Thu Mar 07, 2013 2:17 am
Forum: Volume 119 (11900-11999)
Topic: 11995 - I Can Guess the Data Structure!
Replies: 60
Views: 7329

Re: 11995 - I Can Guess the Data Structure!

Why do I get wrong answer? Seems to work on every sample input:

(C)

Code: Select all

AC

Go to advanced search