Search found 4 matches

by multisystem
Tue Mar 29, 2011 8:37 pm
Forum: Volume 100 (10000-10099)
Topic: 10054 - The Necklace
Replies: 62
Views: 30895

Re: 10054 - The Necklace

AC

The lesson I've learned: push the node after back from DFS

Code: Select all

2
3
1 2
2 2
2 1
3
2 2
2 1
1 2
by multisystem
Wed Aug 04, 2010 1:07 am
Forum: Volume 6 (600-699)
Topic: 639 - Don't Get Rooked
Replies: 11
Views: 9086

Re: 639 - Don't Get Rooked

some useful test cases

Input
4
.X..
....
XX..
....
2
XX
.X
3
.X.
X.X
.X.
3
...
.XX
.XX
4
....
....
....
....
3
...
...
.XX
3
X.X
X.X
X.X
4
X.X.
.X.X
X.X.
.X.X
4
.X.X
X.X.
.X.X
X.X.
4
....
....
....
X.X.
0
Output
5
1
5
2
4
3
1
8
8
4
by multisystem
Fri Oct 02, 2009 10:15 pm
Forum: Volume 115 (11500-11599)
Topic: 11506 - Angry Programmer
Replies: 6
Views: 5725

Re: 11506 - Angry Programmer

Finally got it AC :D Here is some hints Read carefully the problem text, specially 1-There is at most one wire between any pair of machines and there can be pairs of machines without a wire between them. 2- i<k --> 1 <= j < k <= M 3- the wire is bidirectional. This hint also is very useful, http://w...
by multisystem
Fri Oct 02, 2009 4:09 pm
Forum: Volume 115 (11500-11599)
Topic: 11506 - Angry Programmer
Replies: 6
Views: 5725

Re: 11506 - Angry Programmer

This code gives WA, don't know why. Thanks very much If you found it complicated or unreadable, don't disturb yourselves with reading it :D . #include<cmath> #include<vector> #include<iostream> #include<algorithm> #include <map> using namespace std; const int OO = 100000000; const int OO2 = 1000000;...

Go to advanced search