Submission #65096910
Source Code Expand
Copy
#include <stdio.h>int main(void) {int N, i, ans = 0;int logged_in = 0;if (scanf("%d", &N) != 1) return 1;for (i = 0; i < N; i++) {char S[16] = "";if (scanf("%15s", S) != 1) return 1;switch (S[3]) {case 'i':logged_in = 1;break;case 'o':logged_in = 0;break;case 'l':/* 何もしない */break;case 'v':ans += !logged_in;
#include <stdio.h>
int main(void) {
int N, i, ans = 0;
int logged_in = 0;
if (scanf("%d", &N) != 1) return 1;
for (i = 0; i < N; i++) {
char S[16] = "";
if (scanf("%15s", S) != 1) return 1;
switch (S[3]) {
case 'i':
logged_in = 1;
break;
case 'o':
logged_in = 0;
break;
case 'l':
/* 何もしない */
break;
case 'v':
ans += !logged_in;
break;
}
}
printf("%d\n", ans);
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Unauthorized |
| User | mikecat |
| Language | C (gcc 12.2.0) |
| Score | 200 |
| Code Size | 469 Byte |
| Status | AC |
| Exec Time | 0 ms |
| Memory | 1732 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, 00_sample_02.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 01_random_03.txt, 01_random_04.txt, 01_random_05.txt, 01_random_06.txt, 01_random_07.txt, 01_random_08.txt, 01_random_09.txt, 01_random_10.txt, 01_random_11.txt, 01_random_12.txt, 01_random_13.txt, 01_random_14.txt, 01_random_15.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 0 ms | 1712 KB |
| 00_sample_01.txt | AC | 0 ms | 1732 KB |
| 00_sample_02.txt | AC | 0 ms | 1724 KB |
| 01_random_03.txt | AC | 0 ms | 1624 KB |
| 01_random_04.txt | AC | 0 ms | 1636 KB |
| 01_random_05.txt | AC | 0 ms | 1588 KB |
| 01_random_06.txt | AC | 0 ms | 1640 KB |
| 01_random_07.txt | AC | 0 ms | 1672 KB |
| 01_random_08.txt | AC | 0 ms | 1732 KB |
| 01_random_09.txt | AC | 0 ms | 1636 KB |
| 01_random_10.txt | AC | 0 ms | 1592 KB |
| 01_random_11.txt | AC | 0 ms | 1708 KB |
| 01_random_12.txt | AC | 0 ms | 1648 KB |
| 01_random_13.txt | AC | 0 ms | 1724 KB |
| 01_random_14.txt | AC | 0 ms | 1700 KB |
| 01_random_15.txt | AC | 0 ms | 1564 KB |