Submission #991656
Source Code Expand
#include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> #define sl(x) scanf("%ld", &x) #define ss(x) scanf("%s", x) #define pl(x) printf("%ld\n", x) #define ps(x) printf("%s\n", x) #define INF 100000000000 #define M 1000000007 #define min(a,b) (((a)<(b))?(a):(b)) #define max(a,b) (((a)>(b))?(a):(b)) int main() { long H, W; char S[16]; long i, j; long ans = 0; sl(H); sl(W); for(i=0;i<H;i++) { for(j=0;j<W;j++) { ss(S); if(strcmp("snuke", S) == 0) { printf("%c%ld\n", (char)('A' + j), i + 1); } } } return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - Where's Snuke? |
User | Lhaplus |
Language | C (GCC 5.4.1) |
Score | 100 |
Code Size | 594 Byte |
Status | AC |
Exec Time | 1 ms |
Memory | 128 KB |
Compile Error
./Main.c: In function ‘main’: ./Main.c:6:15: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] #define sl(x) scanf("%ld", &x) ^ ./Main.c:23:2: note: in expansion of macro ‘sl’ sl(H); sl(W); ^ ./Main.c:6:15: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] #define sl(x) scanf("%ld", &x) ^ ./Main.c:23:9: note: in expansion of macro ‘sl’ sl(H); sl(W); ^ ./Main.c:7:15: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result] #define ss(x) scanf("%s", x) ^ ./Main.c:26:4: note: in expansion of macro ‘ss’ ss(S); ^
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 |
all | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 1 ms | 128 KB |
01-02.txt | AC | 1 ms | 128 KB |
01-03.txt | AC | 1 ms | 128 KB |
01-04.txt | AC | 1 ms | 128 KB |
01-05.txt | AC | 1 ms | 128 KB |
01-06.txt | AC | 1 ms | 128 KB |
01-07.txt | AC | 1 ms | 128 KB |
sample-01.txt | AC | 1 ms | 128 KB |
sample-02.txt | AC | 1 ms | 128 KB |