Submission #4231699
Source Code Expand
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int,int> pii; #define pb push_back #define mp make_pair #define rep(i,n) for(int i=0;i<(n);++i) unsigned long xor128(void){ static unsigned long x=123456789,y=362436069,z=521288629,w=88675123; unsigned long t; t=(x^(x<<11));x=y;y=z;z=w; return( w=(w^(w>>19))^(t^(t>>8)) ); } int H=50,W=50,K=8; vector<string> s(H); int main(){ cin.tie(0); ios::sync_with_stdio(false); cin >> H >> W >> K; rep(i,W) cin >> s.at(i); vector<pii> ans; rep(i,H){ rep(j,W-7){ bool flg=true; rep(k,K){ if(s[i][j+k]=='0') flg=false; } if(flg){ ans.pb(mp(i,j)); j+=7; } } } cout << ans.size() << endl; rep(i,ans.size()){ int a=ans.at(i).first,b=ans.at(i).second; rep(j,8){ cout << a+1 << " " << b+j+1 << endl; } } }
Submission Info
Submission Time | |
---|---|
Task | A - Multiple Pieces |
User | rhincodon66 |
Language | C++14 (GCC 5.4.1) |
Score | 67411 |
Code Size | 876 Byte |
Status | AC |
Exec Time | 4 ms |
Memory | 256 KB |
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 | 7915 / 1343058 | 4985 / 1343058 | 8789 / 1343058 | 7969 / 1343058 | 7613 / 1343058 | 6521 / 1343058 | 4673 / 1343058 | 4855 / 1343058 | 6452 / 1343058 | 7639 / 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 | AC | 3 ms | 256 KB |
subtask_01_02.txt | AC | 4 ms | 256 KB |
subtask_01_03.txt | AC | 4 ms | 256 KB |
subtask_01_04.txt | AC | 4 ms | 256 KB |
subtask_01_05.txt | AC | 4 ms | 256 KB |
subtask_01_06.txt | AC | 4 ms | 256 KB |
subtask_01_07.txt | AC | 4 ms | 256 KB |
subtask_01_08.txt | AC | 4 ms | 256 KB |
subtask_01_09.txt | AC | 4 ms | 256 KB |
subtask_01_10.txt | AC | 4 ms | 256 KB |