Search found 9 matches

by ferng1021
Wed Aug 22, 2007 11:21 am
Forum: Volume 112 (11200-11299)
Topic: 11221 - Magic square palindromes.
Replies: 58
Views: 21542

I passed sample I/O and the above test data, but still got WA... can any body help me? thank you! #include<stdio.h> #include<string.h> int csN, csk, L, K; char S[10002]; inline bool Equal(char a, char b, char c, char d) { return a == b && a == c && a == d; } int main() { int i, j, t; char ok; scanf(...
by ferng1021
Fri Aug 10, 2007 8:37 pm
Forum: Volume 101 (10100-10199)
Topic: 10199 - Tourist Guide
Replies: 57
Views: 31715

I got same output as yours, Bunau.
And I also have no idea why getting WA.
Can any body help me and give some more I/O?

Thanks!!
by ferng1021
Fri Aug 10, 2007 9:06 am
Forum: Volume 112 (11200-11299)
Topic: 11252 - Take Me Home (To the Place I Belong)
Replies: 8
Views: 2772

11252 - Take Me Home (To the Place I Belong)

I think it's a DP problem,
but I don't know why I got WAs.

Can some body give me some sample input/output?

Thank you very much!!
by ferng1021
Sun Jan 21, 2007 9:27 am
Forum: Volume 111 (11100-11199)
Topic: 11164 - Kingdom Division
Replies: 6
Views: 3160

try these input:

Code: Select all

4 6 9
6 7 15
by ferng1021
Sun Jul 23, 2006 5:39 pm
Forum: Volume 110 (11000-11099)
Topic: 11054 - Wine trading in Gergovia
Replies: 25
Views: 6965

their is a linear algo. to solve this problem..

just think of how many units of wine transport form i to i+1 ...
by ferng1021
Sun Jul 23, 2006 5:34 pm
Forum: Volume 110 (11000-11099)
Topic: 11054 - Wine trading in Gergovia
Replies: 25
Views: 6965

sample input 1

4 units of wine transport from 2 to 1
1 unit of wine transport from 4 to 1
1 unit of wine transport from 4 to 3
1 unit of wine transport from 4 to 5

4*1 + 1*3 + 1*1 + 1*1 = 9
by ferng1021
Sun Apr 02, 2006 12:51 pm
Forum: Volume 110 (11000-11099)
Topic: 11024 - Circular Lock
Replies: 14
Views: 4471

AC!! :D

Thank you andresw1 and rushel!!

Your
%p
is a big hint for me!!

Thank you!!
by ferng1021
Sun Apr 02, 2006 6:28 am
Forum: Volume 110 (11000-11099)
Topic: 11026 - A Grouping Problem
Replies: 28
Views: 18453

if K = 3 --> 1.2.3 + 1.2.4 + 2.3.4 --> 38
actually, 1.2.3 + 1.2.4 + 1.3.4 + 2.3.4 = 50

you have missed 1.3.4
by ferng1021
Sun Apr 02, 2006 5:23 am
Forum: Volume 110 (11000-11099)
Topic: 11024 - Circular Lock
Replies: 14
Views: 4471

11024 - Circular Lock

I got WA during the contest...

I think that a lock can be deactivated if and only if
(p11-s11)%p11 + (p22-s22)%p22 = (p12-s12)%p12 + (p21-s21)%p21

am I right?

If not, what's the correct way to solve this problem?

Thank you very much!!

Go to advanced search