This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************* | |
* | |
* MathJax/extensions/TeX/xypic.js | |
* | |
* Implements Xy-pic environment. | |
* | |
* --------------------------------------------------------------------- | |
* | |
* Copyright (c) 2011-2014 Isao Sonobe <[email protected]>. | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from collections import deque | |
lines = [] | |
for line in sys.stdin: | |
lines.append(line.rstrip('\n')) | |
N = int(lines[0]) | |
G = [set() for _ in range(N)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 | |
20 | |
3 | |
5 | |
2 3 | |
2 4 | |
2 4 | |
9 3 | |
7 6 | |
5 4 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 | |
20 | |
1 1 1 2 | |
1 5 3 2 | |
1 5 1 2 | |
1 5 1 2 | |
1 5 2 | |
1 4 2 | |
1 5 2 | |
1 7 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 | |
20 | |
3 3 7 | |
2 4 7 | |
1 5 8 | |
8 6 1 | |
8 3 3 | |
3 3 2 2 3 | |
2 2 3 2 1 4 | |
3 1 3 3 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 | |
20 | |
1 4 5 2 3 | |
1 3 3 1 2 3 | |
3 2 2 3 2 1 | |
1 2 2 1 2 2 2 | |
1 2 3 2 2 | |
1 2 3 2 2 | |
4 1 2 1 | |
1 2 1 5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 | |
20 | |
3 5 3 | |
1 1 1 1 | |
2 1 2 2 | |
1 2 1 1 | |
1 3 1 1 2 1 | |
1 3 2 1 | |
1 4 3 3 | |
1 1 3 3 1 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 | |
20 | |
10 5 | |
9 2 4 | |
7 4 4 | |
5 5 | |
4 9 | |
3 9 | |
3 1 8 | |
2 1 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 | |
25 | |
3 | |
5 | |
5 | |
2 6 | |
2 6 | |
3 6 | |
4 6 | |
4 2 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 | |
30 | |
22 6 | |
10 6 5 | |
3 4 6 4 | |
4 2 5 2 | |
5 1 5 1 | |
5 9 | |
3 4 8 | |
2 2 7 |