Submission #65816591
Source Code Expand
Copy
#include <stdio.h>int qs, qe;int q[114514];int main(void) {int Q, i;if (scanf("%d", &Q) != 1) return 1;for (i = 0; i < Q; i++) {int type;if (scanf("%d", &type) != 1) return 1;if (type == 1) {if (scanf("%d", &q[qe++]) != 1) return 1;} else if (type == 2) {printf("%d\n", q[qs++]);}}return 0;}
#include <stdio.h> int qs, qe; int q[114514]; int main(void) { int Q, i; if (scanf("%d", &Q) != 1) return 1; for (i = 0; i < Q; i++) { int type; if (scanf("%d", &type) != 1) return 1; if (type == 1) { if (scanf("%d", &q[qe++]) != 1) return 1; } else if (type == 2) { printf("%d\n", q[qs++]); } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Restaurant Queue |
User | mikecat |
Language | C (gcc 12.2.0) |
Score | 200 |
Code Size | 350 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 1764 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
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 | 1 ms | 1728 KB |
00_sample_01.txt | AC | 0 ms | 1564 KB |
01_test_00.txt | AC | 0 ms | 1636 KB |
01_test_01.txt | AC | 0 ms | 1732 KB |
01_test_02.txt | AC | 0 ms | 1640 KB |
01_test_03.txt | AC | 0 ms | 1604 KB |
01_test_04.txt | AC | 0 ms | 1748 KB |
01_test_05.txt | AC | 0 ms | 1712 KB |
01_test_06.txt | AC | 0 ms | 1764 KB |
01_test_07.txt | AC | 0 ms | 1620 KB |
01_test_08.txt | AC | 0 ms | 1752 KB |
01_test_09.txt | AC | 0 ms | 1644 KB |
01_test_10.txt | AC | 0 ms | 1756 KB |
01_test_11.txt | AC | 0 ms | 1636 KB |
01_test_12.txt | AC | 0 ms | 1724 KB |
01_test_13.txt | AC | 0 ms | 1640 KB |
01_test_14.txt | AC | 1 ms | 1636 KB |
01_test_15.txt | AC | 0 ms | 1748 KB |
01_test_16.txt | AC | 0 ms | 1588 KB |
01_test_17.txt | AC | 0 ms | 1624 KB |
01_test_18.txt | AC | 0 ms | 1444 KB |
01_test_19.txt | AC | 0 ms | 1632 KB |
01_test_20.txt | AC | 0 ms | 1596 KB |
01_test_21.txt | AC | 0 ms | 1740 KB |