Submission #64996369


Source Code Expand

Copy
def li():
return list(map(int, input().split()))
from collections import deque
q = deque()
for _ in range(int(input())):
query = li()
if len(query) == 2:
q.append(query[1])
else:
print(q.popleft())
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
def li():
    return list(map(int, input().split()))


from collections import deque

q = deque()
for _ in range(int(input())):
    query = li()
    if len(query) == 2:
        q.append(query[1])
    else:
        print(q.popleft())

Submission Info

Submission Time
Task B - Restaurant Queue
User juntenbanana
Language Python (CPython 3.11.4)
Score 200
Code Size 246 Byte
Status AC
Exec Time 12 ms
Memory 9304 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 24
Set Name Test Cases
Sample 00_sample_00.txt, 00_sample_01.txt
All 00_sample_00.txt, 00_sample_01.txt, 01_test_00.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, 01_test_15.txt, 01_test_16.txt, 01_test_17.txt, 01_test_18.txt, 01_test_19.txt, 01_test_20.txt, 01_test_21.txt
Case Name Status Exec Time Memory
00_sample_00.txt AC 11 ms 9248 KB
00_sample_01.txt AC 11 ms 9148 KB
01_test_00.txt AC 11 ms 9164 KB
01_test_01.txt AC 11 ms 9212 KB
01_test_02.txt AC 11 ms 9280 KB
01_test_03.txt AC 11 ms 9304 KB
01_test_04.txt AC 11 ms 9200 KB
01_test_05.txt AC 11 ms 9164 KB
01_test_06.txt AC 11 ms 9240 KB
01_test_07.txt AC 11 ms 9220 KB
01_test_08.txt AC 11 ms 9128 KB
01_test_09.txt AC 11 ms 9216 KB
01_test_10.txt AC 11 ms 9168 KB
01_test_11.txt AC 11 ms 9216 KB
01_test_12.txt AC 12 ms 9176 KB
01_test_13.txt AC 12 ms 9188 KB
01_test_14.txt AC 11 ms 9208 KB
01_test_15.txt AC 11 ms 9136 KB
01_test_16.txt AC 11 ms 9108 KB
01_test_17.txt AC 11 ms 9232 KB
01_test_18.txt AC 11 ms 9192 KB
01_test_19.txt AC 11 ms 9204 KB
01_test_20.txt AC 11 ms 9196 KB
01_test_21.txt AC 11 ms 9132 KB


2025-04-26 (Sat)
20:48:09 +09:00