Submission #48333434
Source Code Expand
// LUOGU_RID: 138993163
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 225;
int n,m;
string s[N];
bool check(int x,int y){
for(int i = x;i <= x+2;i++){
for(int j = y;j <= y+2;++j){
if(s[i][j] != '#')return false;
}
}for(int i = x;i <= x+3;++i){
if(s[i][y+3] != '.') return false;
}for(int i = y;i <= y+3;++i){
if(s[x+3][i] != '.') return false;
}
for(int i = x+6;i<= x+8;i++){
for(int j = y+6;j<= y+8;j++){
if(s[i][j] != '#') return false;
}
}
for(int i = x+5;i <= x+8;i++){
if(s[i][y+5] != '.') return false;
}
for(int i = y+5;i <= y+8;i++){
if(s[x+5][i] != '.') return false;
}return true;
}
signed main(){
cin >> n >> m;
for(int i = 1;i <= n;i++){
cin >> s[i];
s[i] = ' '+s[i];
}
for(int i = 1;i <= n-8;i++){
for(int j = 1;j <= m-8;j++){
if(check(i,j)){
cout<<i<<" "<<j<<endl;
}
}
}
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - TaK Code |
| User | Expert_Dream |
| Language | C++ 17 (gcc 12.2) |
| Score | 200 |
| Code Size | 1102 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3716 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample_01.txt, sample_02.txt, sample_03.txt |
| All | random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, sample_01.txt, sample_02.txt, sample_03.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| random_01.txt | AC | 1 ms | 3716 KiB |
| random_02.txt | AC | 1 ms | 3508 KiB |
| random_03.txt | AC | 1 ms | 3520 KiB |
| random_04.txt | AC | 1 ms | 3520 KiB |
| random_05.txt | AC | 1 ms | 3484 KiB |
| random_06.txt | AC | 1 ms | 3588 KiB |
| random_07.txt | AC | 1 ms | 3672 KiB |
| random_08.txt | AC | 1 ms | 3516 KiB |
| random_09.txt | AC | 1 ms | 3512 KiB |
| random_10.txt | AC | 1 ms | 3512 KiB |
| random_11.txt | AC | 1 ms | 3460 KiB |
| random_12.txt | AC | 1 ms | 3480 KiB |
| random_13.txt | AC | 1 ms | 3460 KiB |
| random_14.txt | AC | 1 ms | 3596 KiB |
| sample_01.txt | AC | 1 ms | 3592 KiB |
| sample_02.txt | AC | 1 ms | 3516 KiB |
| sample_03.txt | AC | 1 ms | 3580 KiB |