Submission #62021117


Source Code Expand

Copy
a = list(map(int, input().split()))
cnt = 0
for i in range(len(a)-1):
if a[i] > a[i+1]:
a[i], a[i+1] = a[i+1], a[i]
cnt+=1
if (cnt == 1):
print("Yes")
else:
print("No")
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a = list(map(int, input().split()))
cnt = 0
for i in range(len(a)-1):
    if a[i] > a[i+1]:
        a[i], a[i+1] = a[i+1], a[i]
        cnt+=1
if (cnt == 1):
    print("Yes")
else:
    print("No")

Submission Info

Submission Time
Task A - 12435
User Jxsh28
Language Python (CPython 3.11.4)
Score 150
Code Size 205 Byte
Status AC
Exec Time 10 ms
Memory 8604 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 150 / 150
Status
AC × 4
AC × 15
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 9 ms 8604 KB
00_sample_01.txt AC 9 ms 8524 KB
00_sample_02.txt AC 9 ms 8384 KB
00_sample_03.txt AC 10 ms 8496 KB
01_handmade_00.txt AC 9 ms 8544 KB
01_handmade_01.txt AC 9 ms 8492 KB
01_handmade_02.txt AC 9 ms 8384 KB
02_Yes_00.txt AC 9 ms 8460 KB
02_Yes_01.txt AC 9 ms 8468 KB
03_No_00.txt AC 10 ms 8596 KB
03_No_01.txt AC 9 ms 8536 KB
03_No_02.txt AC 10 ms 8552 KB
03_No_03.txt AC 10 ms 8460 KB
03_No_04.txt AC 9 ms 8488 KB
03_No_05.txt AC 10 ms 8432 KB


2025-03-05 (Wed)
12:29:35 +00:00