Submission #1140712
Source Code Expand
#include<iostream>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<string>
#include<stack>
typedef long long int ll;
using namespace std;
#define FOR(i,a,b) for (int i=(a);i<(b);i++)
#define REP(i,n) for (int i=0;i<(n);i++)
#define EFOR(i,a,b) for (int i=(a);i<=(b);i++)
const ll MOD = (10*10*10*10*10*10*10*10*10+7);
int N,a,b,ans=0,count=0
,X[100][100]
,px[3000][10]
,py[3000][10];
int H,W,K;
int main(){
scanf("%d %d %d",&H,&W,&K);
REP(i,H)
REP(j,W){
scanf("%d",X[i][j]);
}
REP(i,H)
REP(j,W){
if(X[i][j]!=0){
count++;
if(count>=8){
REP(a,8){
px[ans][a]=j-7+a;
py[ans][a]=i;
}
ans++;
}
}
if(ans==5)break;
}
printf("%d\n",ans);
REP(i,5)
REP(j,8){
printf("%d %d\n",px[i][j],py[i][j]);
}
}
Submission Info
Submission Time
2017-03-04 20:26:21+0900
Task
A - Multiple Pieces
User
Nafmo2
Language
C++14 (GCC 5.4.1)
Score
0
Code Size
1056 Byte
Status
RE
Exec Time
304 ms
Memory
256 KB
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:24:31: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘int’ [-Wformat=]
scanf("%d",X[i][j]);
^
./Main.cpp:21:31: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d",&H,&W,&K);
^
./Main.cpp:24:32: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",X[i][j]);
^
Judge Result
Set Name
test_01
test_02
test_03
test_04
test_05
test_06
test_07
test_08
test_09
test_10
Score / Max Score
0 / 1343058
0 / 1343058
0 / 1343058
0 / 1343058
0 / 1343058
0 / 1343058
0 / 1343058
0 / 1343058
0 / 1343058
0 / 1343058
Status
Set Name
Test Cases
test_01
subtask_01_01.txt
test_02
subtask_01_02.txt
test_03
subtask_01_03.txt
test_04
subtask_01_04.txt
test_05
subtask_01_05.txt
test_06
subtask_01_06.txt
test_07
subtask_01_07.txt
test_08
subtask_01_08.txt
test_09
subtask_01_09.txt
test_10
subtask_01_10.txt
Case Name
Status
Exec Time
Memory
subtask_01_01.txt
RE
304 ms
256 KB
subtask_01_02.txt
RE
97 ms
256 KB
subtask_01_03.txt
RE
97 ms
256 KB
subtask_01_04.txt
RE
97 ms
256 KB
subtask_01_05.txt
RE
97 ms
256 KB
subtask_01_06.txt
RE
98 ms
256 KB
subtask_01_07.txt
RE
97 ms
256 KB
subtask_01_08.txt
RE
96 ms
256 KB
subtask_01_09.txt
RE
97 ms
256 KB
subtask_01_10.txt
RE
97 ms
256 KB