IMHO, this problem is about graph coloring.
We have a bipartite graph with first set of vertices representing rows & second set of vertices representing columns. Row vertex is connected with appropriate column vertex
if and only if there is a rook in the appropriate cell.
So, we have to find a ...
Search found 6 matches
- Wed Jan 28, 2004 11:03 am
- Forum: Volume 106 (10600-10699)
- Topic: 10615 - Rooks
- Replies: 12
- Views: 5764
- Thu Dec 11, 2003 8:37 am
- Forum: Volume 1 (100-199)
- Topic: 153 - Permalex
- Replies: 32
- Views: 18347
Hi!
Your brute force algorithms obviously cant pass the online judge because in the worst case it has to make as much as 2^30 procedure calls .
:lol:
Note, that permutation number is just number of permutations which are lesser than given one (+1). So you just have to count all permutations which ...
Your brute force algorithms obviously cant pass the online judge because in the worst case it has to make as much as 2^30 procedure calls .
:lol:
Note, that permutation number is just number of permutations which are lesser than given one (+1). So you just have to count all permutations which ...
- Thu Dec 04, 2003 1:30 am
- Forum: Volume 1 (100-199)
- Topic: 145 - Gondwanaland Telecom
- Replies: 62
- Views: 22457
145 WA
Hi!
I tried to submit this program more than 30 times but always got WA.
Can anybody said me what is wrong?
Thanks in advance :-D
#include<vector>
#include<string>
#include<set>
#include<map>
#include<list>
#include<algorithm>
#include<iostream>
#include<math.h>
#include<stdio.h>
#include<queue ...
I tried to submit this program more than 30 times but always got WA.
Can anybody said me what is wrong?
Thanks in advance :-D
#include<vector>
#include<string>
#include<set>
#include<map>
#include<list>
#include<algorithm>
#include<iostream>
#include<math.h>
#include<stdio.h>
#include<queue ...
- Thu Dec 04, 2003 1:07 am
- Forum: Volume 1 (100-199)
- Topic: 138 - Street Numbers
- Replies: 93
- Views: 21216
- Wed Dec 03, 2003 3:59 am
- Forum: Volume 1 (100-199)
- Topic: 195 - Anagram
- Replies: 242
- Views: 58162
- Tue Dec 02, 2003 6:47 am
- Forum: Volume 1 (100-199)
- Topic: 102 - Ecological Bin Packing
- Replies: 485
- Views: 116641