Search found 38 matches

by szymcio2001
Tue Oct 07, 2003 6:25 pm
Forum: Volume 1 (100-199)
Topic: 170 - Clock Patience
Replies: 28
Views: 2853

For everybody who don't know yet how to read input:
You should start playing with "TS"
by szymcio2001
Mon Jun 30, 2003 2:33 pm
Forum: Volume 100 (10000-10099)
Topic: 10056 - What is the Probability ?
Replies: 26
Views: 8761

Your mistake is here: [cpp] printf("%.4lf\n",pow(1.0-P,I-1.0)/(6.0*(1.0-pow(1.0-P,N)))); [/cpp] It should be as follow: [cpp] printf("%.4lf\n",pow(1.0-P,I-1.0)/((1/P)*(1.0-pow(1.0-P,N)))); [/cpp] Because we throw "a dice like thing" not a dice, so it can have more or less than 6 sides. And a little ...
by szymcio2001
Sat Jun 28, 2003 7:30 pm
Forum: Other words
Topic: problem E: SAMS' contest
Replies: 3
Views: 1053

Thanks, you are right. Finally I got Acc.
by szymcio2001
Sat Jun 28, 2003 11:59 am
Forum: Volume 101 (10100-10199)
Topic: 10188 - Automated Judge Script
Replies: 58
Views: 31689

Re: 10188 Runtime eroor Invalid memory reference

[cpp]

state=1;
for(i=0;i<in;i++)
{
if(strcmp(a,id)!=0)
state=0;
}

[/cpp]

I think that if 'in > an' you can got RE, but I'm not sure.

And don't send to board posts with your ID with suffix! At UVA site the suffix works similar to password.
by szymcio2001
Fri Jun 27, 2003 3:07 pm
Forum: Other words
Topic: problem E: SAMS' contest
Replies: 3
Views: 1053

I don't now, but I used this code and got WA :-(
by szymcio2001
Wed Jun 25, 2003 2:04 pm
Forum: Volume 5 (500-599)
Topic: 594 - One Little, Two Little, Three Little Endians
Replies: 46
Views: 14558

Some additional test cases for everyone who has a problem with negative input:
0 -> 0
-1 -> -1
-2 -> -16777217
-65536 -> 65535
by szymcio2001
Wed Jun 25, 2003 11:22 am
Forum: Volume 5 (500-599)
Topic: 573 - The Snail
Replies: 45
Views: 20270

Re: 573 The Snail Why WA ?

In the problem description there is:
If the fatigue factor drops the snail's climbing distance below zero, the snail does not climb at all that day.
So you should change:
[c] u-=f; [/c]
to:
[c]
u -= f;
if (u < 0) u = 0;
[/c]
by szymcio2001
Wed Jun 18, 2003 1:44 am
Forum: Volume 105 (10500-10599)
Topic: 10507 - Waking up brain
Replies: 24
Views: 15361

My finally accepted program gives:

Code: Select all

WAKE UP IN, 3, YEARS

WAKE UP IN, 0, YEARS

THIS BRAIN NEVER WAKES UP

THIS BRAIN NEVER WAKES UP

by szymcio2001
Mon Jun 16, 2003 9:22 pm
Forum: Volume 105 (10500-10599)
Topic: 10507 - Waking up brain
Replies: 24
Views: 15361

Adrian Kuegel wrote:First you should know that there are several test cases, even if the description doesn't say so.
Thanks, my algorithm was correct but I did't consider that there could be more than one test case in the input. Now I got Acc.
by szymcio2001
Mon Jun 16, 2003 2:22 pm
Forum: Volume 105 (10500-10599)
Topic: 10507 - Waking up brain
Replies: 24
Views: 15361

10507 - Waking up brain

It seems to be an easy problem, but I steel get Wrong Answer. I simply use BFS, but I add the vertex to queue only if it is connected with three vericies I visited earlier. If the BFS doesn't visit all areas I output "THIS BRAIN NEVER..." otherwise I output the time that is needed to wake up the bra...
by szymcio2001
Tue May 13, 2003 11:39 am
Forum: Volume 3 (300-399)
Topic: 386 - Perfect Cubes
Replies: 53
Views: 8196

[quote="the900"]I get 223 lines of output but the judge tells me WA. Here's the code, could you help me
by szymcio2001
Sun May 11, 2003 11:07 pm
Forum: Volume 3 (300-399)
Topic: 386 - Perfect Cubes
Replies: 53
Views: 8196

Re: 386 so simple BUT...

Why does give 222 lines in my output ? I compiled it and it printed 223 line on my computer. [cpp] for(d=c;d<a;d++) { if(i==(pow(b,3)+pow(c,3)+pow(d,3))) { printf("Cube = %d, Triple = (%d,%d,%d)\n",a,b,c,d); break; } } }[/cpp] This isn't verry efficient. You should check using math functions if exi...
by szymcio2001
Sun May 11, 2003 11:49 am
Forum: Volume 3 (300-399)
Topic: 300 - Maya Calendar
Replies: 69
Views: 10602

I had RE because I forgot to copy the name of the last month "uayet" to the const array in a source code. The name of it is written few lines below other names in the problem description and this was the cause of my mistake. Maybe you have the similar error.
Good luck!
Szymcio
by szymcio2001
Sat May 10, 2003 1:42 am
Forum: Volume 101 (10100-10199)
Topic: 10179 - Irreducible Basic Fractions
Replies: 28
Views: 10231

I had similar problem, but I had 10179 Acc and 10299 WA.
And I found the difference. In 10179 for 1 you should output 1 and in 10299 you should output 0;

Go to advanced search