Submission #57739448


Source Code Expand

Copy
n, m = map(int, input().split())
cnt = [0] * (n + 1)
for _ in range(m):
a, b = input().split()
if b == "M":
a = int(a)
if cnt[a] == 0:
print("Yes")
cnt[a] += 1
continue
print("No")
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
n, m = map(int, input().split())
cnt = [0] * (n + 1)

for _ in range(m):
    a, b = input().split()
    if b == "M":
        a = int(a)
        if cnt[a] == 0:
            print("Yes")
            cnt[a] += 1
            continue
    print("No")

Submission Info

Submission Time
Task B - Taro
User SoleProprietor
Language Python (PyPy 3.10-v7.3.12)
Score 200
Code Size 260 Byte
Status AC
Exec Time 57 ms
Memory 76680 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 16
Set Name Test Cases
Sample 00_sample_01.txt, 00_sample_02.txt
All 00_sample_01.txt, 00_sample_02.txt, 01_test_01.txt, 01_test_02.txt, 01_test_03.txt, 01_test_04.txt, 01_test_05.txt, 01_test_06.txt, 01_test_07.txt, 01_test_08.txt, 01_test_09.txt, 01_test_10.txt, 01_test_11.txt, 01_test_12.txt, 01_test_13.txt, 01_test_14.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 54 ms 76172 KB
00_sample_02.txt AC 55 ms 76552 KB
01_test_01.txt AC 57 ms 76680 KB
01_test_02.txt AC 56 ms 76556 KB
01_test_03.txt AC 57 ms 76308 KB
01_test_04.txt AC 57 ms 76408 KB
01_test_05.txt AC 57 ms 76592 KB
01_test_06.txt AC 57 ms 76284 KB
01_test_07.txt AC 57 ms 76600 KB
01_test_08.txt AC 57 ms 76480 KB
01_test_09.txt AC 56 ms 76196 KB
01_test_10.txt AC 57 ms 76340 KB
01_test_11.txt AC 54 ms 76384 KB
01_test_12.txt AC 54 ms 76280 KB
01_test_13.txt AC 57 ms 76640 KB
01_test_14.txt AC 57 ms 76564 KB


2025-03-01 (Sat)
05:43:54 +00:00