Submission #1646980
Source Code Expand
# -*- coding: utf-8 -*- from operator import itemgetter def inpl(): return tuple(map(int, input().split())) N = int(input()) A = inpl() g2 = itemgetter(1) order = sorted(tuple(enumerate(A, 1)), key=g2) room = 1 cycle = 1 for next_room, cost in order: if room > next_room: cycle += 1 room = next_room if N > 1 and room == 1: cycle -= 1 print(cycle)
Submission Info
Submission Time | |
---|---|
Task | B - ディスコ社内ツアー |
User | nadare881 |
Language | Python (3.4.3) |
Score | 10 |
Code Size | 392 Byte |
Status | WA |
Exec Time | 151 ms |
Memory | 20200 KB |
Judge Result
Set Name | Sample | Small | Permutation | All | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 20 | 10 / 10 | 0 / 70 | ||||||||||||
Status |
|
|
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 00_example_04.txt |
Small | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 00_example_04.txt, 10_rand_01.txt, 10_rand_02.txt, 10_rand_03.txt, 10_rand_04.txt, 10_rand_05.txt, 10_rand_06.txt, 10_rand_07.txt, 10_rand_08.txt, 20_perm_01.txt, 20_perm_02.txt, 20_perm_03.txt, 20_perm_04.txt, 20_perm_05.txt, 20_perm_06.txt, 20_perm_07.txt, 20_perm_08.txt, 30_hand_01.txt, 30_hand_02.txt, 30_hand_03.txt, 30_hand_04.txt, 30_hand_05.txt, 30_hand_06.txt |
Permutation | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 20_perm_01.txt, 20_perm_02.txt, 20_perm_03.txt, 20_perm_04.txt, 20_perm_05.txt, 20_perm_06.txt, 20_perm_07.txt, 20_perm_08.txt, 30_hand_01.txt, 30_hand_02.txt, 60_perm_01.txt, 60_perm_02.txt, 60_perm_03.txt, 60_perm_04.txt, 60_perm_05.txt, 60_perm_06.txt, 60_perm_07.txt, 60_perm_08.txt, 70_hand_01.txt, 70_hand_02.txt |
All | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 00_example_04.txt, 10_rand_01.txt, 10_rand_02.txt, 10_rand_03.txt, 10_rand_04.txt, 10_rand_05.txt, 10_rand_06.txt, 10_rand_07.txt, 10_rand_08.txt, 20_perm_01.txt, 20_perm_02.txt, 20_perm_03.txt, 20_perm_04.txt, 20_perm_05.txt, 20_perm_06.txt, 20_perm_07.txt, 20_perm_08.txt, 30_hand_01.txt, 30_hand_02.txt, 30_hand_03.txt, 30_hand_04.txt, 30_hand_05.txt, 30_hand_06.txt, 50_rand_01.txt, 50_rand_02.txt, 50_rand_03.txt, 50_rand_04.txt, 50_rand_05.txt, 50_rand_06.txt, 50_rand_07.txt, 50_rand_08.txt, 60_perm_01.txt, 60_perm_02.txt, 60_perm_03.txt, 60_perm_04.txt, 60_perm_05.txt, 60_perm_06.txt, 60_perm_07.txt, 60_perm_08.txt, 70_hand_01.txt, 70_hand_02.txt, 70_hand_03.txt, 70_hand_04.txt, 70_hand_05.txt, 70_hand_06.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 20 ms | 3060 KB |
00_example_02.txt | AC | 20 ms | 3060 KB |
00_example_03.txt | AC | 19 ms | 3064 KB |
00_example_04.txt | AC | 19 ms | 3060 KB |
10_rand_01.txt | WA | 19 ms | 3060 KB |
10_rand_02.txt | WA | 19 ms | 3060 KB |
10_rand_03.txt | WA | 19 ms | 3060 KB |
10_rand_04.txt | AC | 19 ms | 3060 KB |
10_rand_05.txt | AC | 19 ms | 3060 KB |
10_rand_06.txt | WA | 20 ms | 3060 KB |
10_rand_07.txt | WA | 19 ms | 3060 KB |
10_rand_08.txt | WA | 19 ms | 3064 KB |
20_perm_01.txt | AC | 19 ms | 3060 KB |
20_perm_02.txt | AC | 19 ms | 3060 KB |
20_perm_03.txt | AC | 19 ms | 3064 KB |
20_perm_04.txt | AC | 19 ms | 3064 KB |
20_perm_05.txt | AC | 19 ms | 3060 KB |
20_perm_06.txt | AC | 19 ms | 3060 KB |
20_perm_07.txt | AC | 19 ms | 3060 KB |
20_perm_08.txt | AC | 19 ms | 3060 KB |
30_hand_01.txt | AC | 19 ms | 3060 KB |
30_hand_02.txt | AC | 19 ms | 3060 KB |
30_hand_03.txt | AC | 19 ms | 3060 KB |
30_hand_04.txt | AC | 19 ms | 3060 KB |
30_hand_05.txt | AC | 20 ms | 3064 KB |
30_hand_06.txt | WA | 19 ms | 3060 KB |
50_rand_01.txt | WA | 55 ms | 8344 KB |
50_rand_02.txt | WA | 98 ms | 13308 KB |
50_rand_03.txt | WA | 97 ms | 13700 KB |
50_rand_04.txt | WA | 79 ms | 11248 KB |
50_rand_05.txt | WA | 41 ms | 6364 KB |
50_rand_06.txt | WA | 20 ms | 3064 KB |
50_rand_07.txt | WA | 29 ms | 4724 KB |
50_rand_08.txt | WA | 81 ms | 11580 KB |
60_perm_01.txt | AC | 59 ms | 9112 KB |
60_perm_02.txt | AC | 107 ms | 14228 KB |
60_perm_03.txt | AC | 101 ms | 14912 KB |
60_perm_04.txt | AC | 88 ms | 11976 KB |
60_perm_05.txt | AC | 43 ms | 6592 KB |
60_perm_06.txt | AC | 19 ms | 3060 KB |
60_perm_07.txt | AC | 30 ms | 4852 KB |
60_perm_08.txt | AC | 90 ms | 12436 KB |
70_hand_01.txt | AC | 89 ms | 19432 KB |
70_hand_02.txt | AC | 105 ms | 19432 KB |
70_hand_03.txt | AC | 94 ms | 19168 KB |
70_hand_04.txt | AC | 93 ms | 19168 KB |
70_hand_05.txt | WA | 151 ms | 20200 KB |
70_hand_06.txt | WA | 135 ms | 18768 KB |