Submission #3996663
Source Code Expand
# coding:utf-8 import sys # from collections import Counter, defaultdict INF = float('inf') MOD = 10 ** 9 + 7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LS(): return sys.stdin.readline().split() def I(): return int(sys.stdin.readline()) def S(): return input() N = I() x = -1 for i in range(500): if N == i * (i + 1) // 2: x = i if x == -1: print('No') exit() print('Yes') print(x + 1) num = [i + 1 for i in range(N)] S = [[0] * x for _ in range(x + 1)] k = 0 for i in range(x): for j in range(i, x): S[i][j] = num[k] S[j + 1][i] = num[k] k += 1 for s in S: print(len(s), ' '.join(map(str, s)))
Submission Info
Submission Time | |
---|---|
Task | D - Crossing |
User | uni745e |
Language | Python (3.4.3) |
Score | 500 |
Code Size | 719 Byte |
Status | AC |
Exec Time | 105 ms |
Memory | 9752 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 500 / 500 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, 23.txt, 24.txt, s1.txt, s2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 18 ms | 3064 KB |
02.txt | AC | 18 ms | 3064 KB |
03.txt | AC | 17 ms | 3064 KB |
04.txt | AC | 18 ms | 3064 KB |
05.txt | AC | 17 ms | 3064 KB |
06.txt | AC | 18 ms | 3064 KB |
07.txt | AC | 17 ms | 3064 KB |
08.txt | AC | 18 ms | 3064 KB |
09.txt | AC | 18 ms | 3064 KB |
10.txt | AC | 18 ms | 3064 KB |
11.txt | AC | 99 ms | 8856 KB |
12.txt | AC | 105 ms | 9752 KB |
13.txt | AC | 17 ms | 3064 KB |
14.txt | AC | 18 ms | 3064 KB |
15.txt | AC | 18 ms | 3064 KB |
16.txt | AC | 18 ms | 3064 KB |
17.txt | AC | 18 ms | 3064 KB |
18.txt | AC | 25 ms | 3572 KB |
19.txt | AC | 48 ms | 5400 KB |
20.txt | AC | 17 ms | 3064 KB |
21.txt | AC | 68 ms | 6680 KB |
22.txt | AC | 59 ms | 6168 KB |
23.txt | AC | 18 ms | 3064 KB |
24.txt | AC | 17 ms | 3064 KB |
s1.txt | AC | 17 ms | 3064 KB |
s2.txt | AC | 18 ms | 3064 KB |