Submission #1647039
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 = 0 cycle = 1 for next_room, cost in order: if room > next_room: cycle += 1 room = next_room if room == 1: cycle -= 1 if N == 1: print(1) else: print(cycle)
Submission Info
Submission Time | |
---|---|
Task | B - ディスコ社内ツアー |
User | nadare881 |
Language | Python (3.4.3) |
Score | 10 |
Code Size | 419 Byte |
Status | WA |
Exec Time | 141 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 | 19 ms | 3188 KB |
00_example_02.txt | AC | 18 ms | 3060 KB |
00_example_03.txt | AC | 18 ms | 3060 KB |
00_example_04.txt | AC | 18 ms | 3064 KB |
10_rand_01.txt | WA | 18 ms | 3064 KB |
10_rand_02.txt | WA | 18 ms | 3060 KB |
10_rand_03.txt | WA | 18 ms | 3064 KB |
10_rand_04.txt | AC | 18 ms | 3064 KB |
10_rand_05.txt | AC | 18 ms | 3060 KB |
10_rand_06.txt | WA | 18 ms | 3064 KB |
10_rand_07.txt | WA | 18 ms | 3064 KB |
10_rand_08.txt | WA | 18 ms | 3064 KB |
20_perm_01.txt | AC | 18 ms | 3064 KB |
20_perm_02.txt | AC | 18 ms | 3064 KB |
20_perm_03.txt | AC | 18 ms | 3064 KB |
20_perm_04.txt | AC | 18 ms | 3060 KB |
20_perm_05.txt | AC | 18 ms | 3188 KB |
20_perm_06.txt | AC | 19 ms | 3064 KB |
20_perm_07.txt | AC | 18 ms | 3060 KB |
20_perm_08.txt | AC | 18 ms | 3064 KB |
30_hand_01.txt | AC | 18 ms | 3064 KB |
30_hand_02.txt | AC | 18 ms | 3060 KB |
30_hand_03.txt | AC | 18 ms | 3060 KB |
30_hand_04.txt | AC | 18 ms | 3060 KB |
30_hand_05.txt | AC | 18 ms | 3064 KB |
30_hand_06.txt | WA | 18 ms | 3060 KB |
50_rand_01.txt | WA | 52 ms | 8512 KB |
50_rand_02.txt | WA | 87 ms | 13308 KB |
50_rand_03.txt | WA | 88 ms | 13700 KB |
50_rand_04.txt | WA | 73 ms | 11244 KB |
50_rand_05.txt | WA | 38 ms | 6364 KB |
50_rand_06.txt | WA | 18 ms | 3064 KB |
50_rand_07.txt | WA | 28 ms | 4724 KB |
50_rand_08.txt | WA | 72 ms | 11580 KB |
60_perm_01.txt | AC | 54 ms | 9112 KB |
60_perm_02.txt | AC | 92 ms | 14228 KB |
60_perm_03.txt | AC | 96 ms | 14912 KB |
60_perm_04.txt | AC | 82 ms | 11980 KB |
60_perm_05.txt | AC | 40 ms | 6596 KB |
60_perm_06.txt | AC | 18 ms | 3060 KB |
60_perm_07.txt | AC | 28 ms | 4852 KB |
60_perm_08.txt | AC | 78 ms | 12436 KB |
70_hand_01.txt | AC | 87 ms | 19432 KB |
70_hand_02.txt | AC | 92 ms | 19432 KB |
70_hand_03.txt | AC | 85 ms | 19168 KB |
70_hand_04.txt | AC | 85 ms | 19168 KB |
70_hand_05.txt | WA | 141 ms | 20200 KB |
70_hand_06.txt | WA | 122 ms | 18764 KB |