Search found 6 matches

by sarig
Mon Oct 14, 2002 6:20 pm
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 36960

Hmm.. peculiar.. when I use your angle-code it gets AC, but not with my own. It works with every test I've tried on my own though. Ooh well, thanx for the help.
by sarig
Mon Oct 14, 2002 3:14 pm
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 36960

Tested and working. Also tested hits on borders and on corners. I hope I've interpreted this correctly.

A hit on a border does not affect a kingdom. Neither does a hit on a corner.

Cheers,
Sarig
by sarig
Mon Oct 14, 2002 2:38 pm
Forum: Volume 1 (100-199)
Topic: 109 - SCUD Busters
Replies: 96
Views: 36960

[109] examples of tricky input?

Hello!

Need some examples on tricky input and its output. My program works for all input I've tried but get WA still.

My main idea.

Compute convex hull and area of all kingdoms. For each missile test inclusion and add area to sum if point inside walls.

Cheers,
Sarig
by sarig
Fri Oct 11, 2002 3:03 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 55060

Gaaa!

Thanx!

Remove the c==1 code and change N=2 to N=1 was enough :) (in the case where c==1 we have N=1 and the depth of the tree becomes log_2(h)).

Thanx again! I got it accepted now.

Cheers,
Sarig :D
by sarig
Fri Oct 11, 2002 2:21 pm
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 55060

These are my current test cases:

Input:


216 125
5764801 1679616
1024 243
2 1
4 1
1024 1
371293 248832
11 10
1 1
1048576 59049
483736625 481890304
125 64
1 0
64 1
0 0


Output:


31 671
335923 30275911
121 3367
1 3
1 5
1 1025
22621 1840825
1 21
0 1
29524 4017157
615441 1931252289
21 369
0 0
1 ...
by sarig
Fri Oct 11, 2002 12:44 am
Forum: Volume 1 (100-199)
Topic: 107 - The Cat in the Hat
Replies: 278
Views: 55060

problem 107 - WA

Hello!

Could someone tell me why I get WA on this? I works fine with every test I've made on my own computer. Every suggested test on this forum works fine.

[c]
int main(void) {
int N, h, c;
long th, toth, totc, tc;
double k;

while(scanf("%d %d", &h, &c) != EOF) {
if(h == 0 && c == 0)
break ...

Go to advanced search