Submission #3025772


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
int main()
{
	int x,y;
	char s[105][105],f;
	cin>>x>>y>>f;
	for(int i=0;i<=x;i++)
	gets(s[i]);
	for(int i=0;i<y+2;i++)
	cout<<"#";
	cout<<endl;
	for(int i=1;i<=x;i++)
	{
		cout<<"#";
		for(int j=0;j<y;j++)
		cout<<s[i][j];
		cout<<"#"<<endl;
	}
	for(int i=0;i<y+2;i++)
	cout<<"#";
	return 0;
}

Submission Info

Submission Time
Task B - Picture Frame
User miduo
Language C++ (GCC 5.4.1)
Score 0
Code Size 361 Byte
Status WA
Exec Time 2 ms
Memory 256 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:9:2: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
  gets(s[i]);
  ^
In file included from /usr/include/c++/5/cstdio:42:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
                 from ./Main.cpp:1:
/usr/include/stdio.h:638:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^
./Main.cpp:9:2: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
  gets(s[i]);
  ^
In file included from /usr/include/c++/5/cstdio:42:0,
                 from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:46,
                 from ./Main.cpp:1:
/usr/include/stdio.h:638:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^
./Main.cpp:9:11: warning: ‘char* gets(char*)’ is deprecated [-Wdeprecated-declarations]
  gets(s[i]);
           ^
In file included from /usr/include/c++/5/cstdio:42:0,
                ...

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
WA × 2
WA × 10
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 WA 1 ms 256 KB
0_01.txt WA 1 ms 256 KB
1_00.txt WA 1 ms 256 KB
1_01.txt WA 1 ms 256 KB
1_02.txt WA 1 ms 256 KB
1_03.txt WA 2 ms 256 KB
1_04.txt WA 1 ms 256 KB
1_05.txt WA 1 ms 256 KB
1_06.txt WA 1 ms 256 KB
1_07.txt WA 1 ms 256 KB