Submission #69030280
Source Code Expand
Copy
#include <stdio.h>#include <string.h>int N;char S[128][16];int X;char Y[16];int main(void) {int i;if (scanf("%d", &N) != 1) return 1;for (i = 1; i <= N; i++) {if (scanf("%15s", S[i]) != 1) return 1;}if (scanf("%d%15s", &X, &Y) != 2) return 1;puts(strcmp(S[X], Y) == 0 ? "Yes" : "No");return 0;}
#include <stdio.h>
#include <string.h>
int N;
char S[128][16];
int X;
char Y[16];
int main(void) {
int i;
if (scanf("%d", &N) != 1) return 1;
for (i = 1; i <= N; i++) {
if (scanf("%15s", S[i]) != 1) return 1;
}
if (scanf("%d%15s", &X, &Y) != 2) return 1;
puts(strcmp(S[X], Y) == 0 ? "Yes" : "No");
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | A - Misdelivery |
| User | mikecat |
| Language | C (gcc 12.2.0) |
| Score | 100 |
| Code Size | 339 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 1628 KiB |
Compile Error
Main.c: In function ‘main’:
Main.c:15:25: warning: format ‘%s’ expects argument of type ‘char *’, but argument 3 has type ‘char (*)[16]’ [-Wformat=]
15 | if (scanf("%d%15s", &X, &Y) != 2) return 1;
| ~~~^ ~~
| | |
| char * char (*)[16]
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt, sample_03.txt, sample_04.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 0 ms | 1584 KiB |
| random_02.txt | AC | 0 ms | 1544 KiB |
| random_03.txt | AC | 0 ms | 1628 KiB |
| random_04.txt | AC | 0 ms | 1628 KiB |
| random_05.txt | AC | 0 ms | 1596 KiB |
| random_06.txt | AC | 0 ms | 1564 KiB |
| random_07.txt | AC | 0 ms | 1616 KiB |
| random_08.txt | AC | 0 ms | 1576 KiB |
| sample_01.txt | AC | 1 ms | 1604 KiB |
| sample_02.txt | AC | 0 ms | 1540 KiB |
| sample_03.txt | AC | 0 ms | 1624 KiB |
| sample_04.txt | AC | 0 ms | 1548 KiB |