Submission #3025477
Source Code Expand
#include <stdio.h> int main(void) { int h,w,i,j; scanf("%d%d",&h,&w); char a[102][102],b[102][102]; for(i=0; i<h; i++){ scanf("%s",&a[i]); } for(i=0; i<h+2; i++){ for(j=0; j<w+2; j++){ b[i][j]='#'; } } for(i=0; i<h; i++){ for(j=0; j<w; j++){ b[i+1][j+1]=a[i][j]; } } for(i=0; i<h+2; i++){ printf("%s\n",b[i]); } return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - Picture Frame |
User | yuruhiya |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 376 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 640 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:8:19: warning: format ‘%s’ expects argument of type ‘char*’, but argument 2 has type ‘char (*)[102]’ [-Wformat=] scanf("%s",&a[i]); ^ ./Main.cpp:5:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%d%d",&h,&w); ^ ./Main.cpp:8:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",&a[i]); ^
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt |
All | 0_00.txt, 0_01.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 0 ms | 128 KB |
0_01.txt | AC | 0 ms | 128 KB |
1_00.txt | AC | 0 ms | 128 KB |
1_01.txt | WA | 0 ms | 128 KB |
1_02.txt | WA | 1 ms | 128 KB |
1_03.txt | WA | 1 ms | 640 KB |
1_04.txt | AC | 0 ms | 128 KB |
1_05.txt | WA | 1 ms | 128 KB |
1_06.txt | AC | 1 ms | 128 KB |
1_07.txt | AC | 0 ms | 128 KB |