Search found 20 matches

by SerailHydra
Thu Mar 05, 2009 3:42 pm
Forum: Volume 115 (11500-11599)
Topic: 11578 - Situp Benches
Replies: 8
Views: 2204

Re: 11578 - Situp Benches

Thanks to Jan, I got AC.
by SerailHydra
Mon Feb 23, 2009 1:55 am
Forum: Volume 115 (11500-11599)
Topic: 11564 - Just A Few More Triangles!
Replies: 2
Views: 1234

Re: 11564 - Just A Few More Triangles!

These are all the 18 solutions for N = 7:
1 1 3
1 1 4
1 6 3
1 6 4
2 2 1
2 2 6
2 5 1
2 5 6
3 3 2
3 3 5
3 4 2
3 4 5
4 4 2
4 4 5
5 5 1
5 5 6
6 6 3
6 6 4
Good luck
by SerailHydra
Sun Feb 22, 2009 12:20 pm
Forum: Volume 115 (11500-11599)
Topic: 11578 - Situp Benches
Replies: 8
Views: 2204

11578 - Situp Benches

Is there anyone who can explain the sample to me? Thanks.
by SerailHydra
Sun Feb 22, 2009 11:42 am
Forum: Volume 115 (11500-11599)
Topic: 11584 - Partitioning by Palindromes
Replies: 14
Views: 3768

Re: 11584 - Partitioning by Palindromes

It's O(N^2) DP
by SerailHydra
Sun Feb 22, 2009 11:41 am
Forum: Volume 115 (11500-11599)
Topic: 11585 - Nurikabe
Replies: 20
Views: 7177

Re: 11585 - Nurikabe

"For any unshaded space b, there is a sequence of unshaded spaces starting at b and ending at a space on the edge of the grid where consecutive spaces in this sequence share a side or a corner. "
by SerailHydra
Sun Feb 15, 2009 9:32 am
Forum: Volume 115 (11500-11599)
Topic: 11531 - Solve the Broken Maze
Replies: 15
Views: 6548

Re: 11531 - Solve the Broken Maze

Is there anyone who can provide some tests for me? I got so many WAs. Here is my code: #include <iostream> using namespace std; #define MaxN 20005 #define MaxSize 200 #define MaxHash 300000 typedef int List[6]; int Test, N, Total = 0; char Map[4][MaxN]; List E, State[MaxSize]; int Serial[MaxHash], T...
by SerailHydra
Sun Feb 15, 2009 2:56 am
Forum: Volume 115 (11500-11599)
Topic: 11574 - Colliding Traffic
Replies: 1
Views: 877

Re: 11574

Enumerate each pair of the boats, and check in which time they will get collision, it's a quadratic about the time.
by SerailHydra
Tue Dec 30, 2008 3:36 am
Forum: Volume 115 (11500-11599)
Topic: 11571 - Simple Equations - Extreme!!
Replies: 31
Views: 11101

Re: 11571 - Simple Equations - Extreme!!

A Hint:
(a + b + c)^2 = a^2 + b^2 + c^2 + 2(xy + yz + zx)

At least my solution uses it. And yes, then the biggest trouble is the precision.
by SerailHydra
Sun Dec 28, 2008 2:36 am
Forum: Volume 115 (11500-11599)
Topic: 11568 - Pincer Attack!!
Replies: 5
Views: 1212

11568 - Pincer Attack!!

Can anyone provide some tricky test? It's such a troublesome code.
by SerailHydra
Sun Dec 28, 2008 2:26 am
Forum: Volume 115 (11500-11599)
Topic: 11571 - Simple Equations - Extreme!!
Replies: 31
Views: 11101

Re: 11571 Simple Equations - Extreme!!

Thank you so much.
by SerailHydra
Wed Dec 24, 2008 11:40 am
Forum: Volume 115 (11500-11599)
Topic: 11555 - Aspen Avenue
Replies: 6
Views: 1628

Re: 11555 - Aspen Avenue

My solution is DP, and runs O(N^2) can U tell me more details? I do not know how to dp. THX When we have arranged the first i trees on the left side and j trees on the right side, we use F [j] to denote the minimum distance these trees need to be moved. It should be easy for you to write the equati...
by SerailHydra
Wed Dec 17, 2008 5:14 am
Forum: Volume 115 (11500-11599)
Topic: 11563 - Introspective Caching
Replies: 7
Views: 1400

Re: 11563 Introspective Caching

Your answers are correct for this test.

My greedy solution is like this: when you need to remove an object, you should chose the one which will appear again at the latest.
by SerailHydra
Sun Dec 14, 2008 3:12 am
Forum: Volume 115 (11500-11599)
Topic: 11555 - Aspen Avenue
Replies: 6
Views: 1628

Re: 11555 - Aspen Avenue

My solution is DP, and runs O(N^2)
by SerailHydra
Wed Nov 05, 2008 8:12 am
Forum: Volume 115 (11500-11599)
Topic: 11550 - Demanding Dilemma
Replies: 12
Views: 5348

Re: 11550 - Demanding Dilemma

The graph should be a simple indirected one.

Pay attention to the word 'simple'.
by SerailHydra
Wed Nov 05, 2008 8:09 am
Forum: Volume 115 (11500-11599)
Topic: 11546 - Olympic Swimming
Replies: 6
Views: 1195

Re: 11546 Olympic Swimming

Can anyone explain the algorithm to this problem?

Go to advanced search