Submission #978927
Source Code Expand
n = 3 p = [2, 1, 0] n = input() p = map(lambda x: x - 1, map(eval, raw_input().strip().split())) a = [] b = [] for i in xrange(n): x = (i + 1) * 2 a += [x] y = (n - i) * 2 b += [y] for i, x in enumerate(p): if a[x] + b[x] <= a[p[i-1]] + b[p[i-1]]: a[x] += a[p[i-1]] + b[p[i-1]] - a[x] + b[x] + 1 print a[x] + b[x] print a, b
Submission Info
Submission Time | |
---|---|
Task | B - Construct Sequences |
User | m2048so3 |
Language | Python (2.7.6) |
Score | 0 |
Code Size | 365 Byte |
Status | WA |
Exec Time | 148 ms |
Memory | 5340 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | example0.txt, example1.txt, example2.txt |
All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, example0.txt, example1.txt, example2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
000.txt | WA | 28 ms | 2936 KB |
001.txt | WA | 23 ms | 2820 KB |
002.txt | WA | 22 ms | 2820 KB |
003.txt | WA | 19 ms | 2692 KB |
004.txt | WA | 25 ms | 2820 KB |
005.txt | WA | 142 ms | 5236 KB |
006.txt | WA | 41 ms | 3096 KB |
007.txt | WA | 128 ms | 4992 KB |
008.txt | WA | 80 ms | 4072 KB |
009.txt | WA | 142 ms | 5284 KB |
010.txt | WA | 147 ms | 5340 KB |
011.txt | WA | 143 ms | 5340 KB |
012.txt | WA | 148 ms | 5340 KB |
013.txt | WA | 146 ms | 5340 KB |
014.txt | WA | 147 ms | 5340 KB |
015.txt | WA | 145 ms | 5340 KB |
016.txt | WA | 144 ms | 5340 KB |
017.txt | WA | 142 ms | 5340 KB |
018.txt | WA | 142 ms | 5340 KB |
example0.txt | WA | 15 ms | 2692 KB |
example1.txt | WA | 15 ms | 2692 KB |
example2.txt | WA | 15 ms | 2692 KB |