Submission #62028763
Source Code Expand
Copy
A = list(map(int, input().split()))B = [1,2,3,4,5]n = 5ans = Falsedif = 0for i in range(n):if A[i] != B[i]:dif += 1for i in range(1, n):if A[i-1] != B[i-1] and A[i] != B[i]:ans = Trueprint("Yes" if ans and dif==2 else "No")
A = list(map(int, input().split())) B = [1,2,3,4,5] n = 5 ans = False dif = 0 for i in range(n): if A[i] != B[i]: dif += 1 for i in range(1, n): if A[i-1] != B[i-1] and A[i] != B[i]: ans = True print("Yes" if ans and dif==2 else "No")
Submission Info
Submission Time | |
---|---|
Task | A - 12435 |
User | Koopa |
Language | Python (PyPy 3.10-v7.3.12) |
Score | 150 |
Code Size | 257 Byte |
Status | AC |
Exec Time | 55 ms |
Memory | 76644 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 150 / 150 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt |
All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_handmade_00.txt, 01_handmade_01.txt, 01_handmade_02.txt, 02_Yes_00.txt, 02_Yes_01.txt, 03_No_00.txt, 03_No_01.txt, 03_No_02.txt, 03_No_03.txt, 03_No_04.txt, 03_No_05.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_sample_00.txt | AC | 55 ms | 76584 KB |
00_sample_01.txt | AC | 55 ms | 76196 KB |
00_sample_02.txt | AC | 54 ms | 76532 KB |
00_sample_03.txt | AC | 54 ms | 76400 KB |
01_handmade_00.txt | AC | 53 ms | 76420 KB |
01_handmade_01.txt | AC | 54 ms | 76644 KB |
01_handmade_02.txt | AC | 53 ms | 76480 KB |
02_Yes_00.txt | AC | 54 ms | 76320 KB |
02_Yes_01.txt | AC | 54 ms | 76368 KB |
03_No_00.txt | AC | 54 ms | 76280 KB |
03_No_01.txt | AC | 54 ms | 76412 KB |
03_No_02.txt | AC | 54 ms | 76568 KB |
03_No_03.txt | AC | 54 ms | 76308 KB |
03_No_04.txt | AC | 54 ms | 76312 KB |
03_No_05.txt | AC | 54 ms | 76536 KB |