Submission #51561681


Source Code Expand

s = "wbwbwwbwbwbw"
s = s *50
ws = set()
for i in range(len(s)):
    p, q = 0, 0
    for j in range(i, len(s)):
        if s[j] == "w":
            p += 1
        else:
            q += 1
        ws.add((p, q))

w, b = map(int, input().split())
if (w, b) in ws:
    print("Yes")
else:
    print("No")

Submission Info

Submission Time
Task B - Piano
User yefllower
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 319 Byte
Status AC
Exec Time 70 ms
Memory 81948 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 3
AC × 22
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_yes_00.txt, 01_random_yes_01.txt, 02_random_yes_2_00.txt, 02_random_yes_2_01.txt, 02_random_yes_2_02.txt, 02_random_yes_2_03.txt, 03_random_no_00.txt, 03_random_no_01.txt, 04_random_no_2_00.txt, 04_random_no_2_01.txt, 04_random_no_2_02.txt, 04_random_no_2_03.txt, 05_handmade_00.txt, 05_handmade_01.txt, 05_handmade_02.txt, 05_handmade_03.txt, 05_handmade_04.txt, 05_handmade_05.txt, 05_handmade_06.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 70 ms 81512 KiB
00_sample_01.txt AC 68 ms 81556 KiB
00_sample_02.txt AC 68 ms 81600 KiB
01_random_yes_00.txt AC 69 ms 81560 KiB
01_random_yes_01.txt AC 67 ms 81800 KiB
02_random_yes_2_00.txt AC 68 ms 81948 KiB
02_random_yes_2_01.txt AC 68 ms 81852 KiB
02_random_yes_2_02.txt AC 68 ms 81884 KiB
02_random_yes_2_03.txt AC 68 ms 81948 KiB
03_random_no_00.txt AC 69 ms 81600 KiB
03_random_no_01.txt AC 69 ms 81432 KiB
04_random_no_2_00.txt AC 69 ms 81780 KiB
04_random_no_2_01.txt AC 69 ms 81524 KiB
04_random_no_2_02.txt AC 68 ms 81808 KiB
04_random_no_2_03.txt AC 68 ms 81788 KiB
05_handmade_00.txt AC 68 ms 81940 KiB
05_handmade_01.txt AC 68 ms 81796 KiB
05_handmade_02.txt AC 68 ms 81736 KiB
05_handmade_03.txt AC 68 ms 81800 KiB
05_handmade_04.txt AC 68 ms 81432 KiB
05_handmade_05.txt AC 68 ms 81424 KiB
05_handmade_06.txt AC 68 ms 81560 KiB