QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#77336 | #3999. BpbBppbpBB | chenshi# | AC ✓ | 14ms | 2556kb | C++ | 663b | 2023-02-14 10:43:03 | 2023-02-14 10:43:05 |
Judging History
answer
#include<cstdio>
using namespace std;
const int o=1010;
int n,m,a,b;char s[o][o],c[10][10];
inline bool chk(int x,int y){
for(int i=0;i<=9;++i) for(int j=0;j<=9;++j) if(s[x+i][y+j]^c[i][j]) return false;
return true;
}
int main(){
scanf("%d%d",&n,&m);
for(int i=1;i<=n;++i) scanf("%s",s[i]+1);
for(int i=0;i<10;++i) for(int j=0;j<10;++j) c[i][j]='#';
c[3][4]=c[3][5]=c[4][3]=c[4][4]=c[4][5]=c[4][6]=c[5][3]=c[5][4]=c[5][5]=c[5][6]=c[6][4]=c[6][5]='.';
for(int i=1;i<=n-9;++i) for(int j=1;j<=m-9;++j) a+=chk(i,j);
for(int i=1;i<=n;++i) for(int j=1;j<=m;++j) b+=(s[i][j]=='#');
printf("%d %d\n",(a-(b-73*a)/27)/2,(b-73*a)/27);
return 0;
}
詳細信息
Test #1:
score: 100
Accepted
time: 1ms
memory: 1736kb
input:
10 17 ################# ################# ################# ####..#####..#### ###....###....### ###....###....### ####..#####..#### ################# ################# #################
output:
1 0
result:
ok single line: '1 0'
Test #2:
score: 0
Accepted
time: 1ms
memory: 1564kb
input:
14 11 .########## .########## .########## .####..#### .###....### .###....### .####..#### .########## .########## .########## .###....... .###....... .###....... .###.......
output:
0 1
result:
ok single line: '0 1'
Test #3:
score: 0
Accepted
time: 1ms
memory: 1732kb
input:
20 14 .##########... .##########... .##########... .####..####... .###....###... .###....###... .####..####... .##########... .##########... .##########... .############# .############# .############# .#######..#### ....###....### ....###....### ....####..#### ############## ############## #########...
output:
0 2
result:
ok single line: '0 2'
Test #4:
score: 0
Accepted
time: 0ms
memory: 1476kb
input:
1 1 .
output:
0 0
result:
ok single line: '0 0'
Test #5:
score: 0
Accepted
time: 0ms
memory: 1692kb
input:
50 50 .................................................. .................................................. .................................................. .................................................. .................................................. ..........................................
output:
4 1
result:
ok single line: '4 1'
Test #6:
score: 0
Accepted
time: 1ms
memory: 1612kb
input:
50 50 .................................................. .................................................. .................................................. .................................................. .................................................. ..........................................
output:
3 7
result:
ok single line: '3 7'
Test #7:
score: 0
Accepted
time: 5ms
memory: 2460kb
input:
1000 1000 ...................###.......................................................##########................##########.###.............................................................##############.............................#################..............................#################........
output:
1621 2804
result:
ok single line: '1621 2804'
Test #8:
score: 0
Accepted
time: 4ms
memory: 2556kb
input:
1000 1000 .....##############.....................................................................................##############.....................................##############...................................##########...................................................................#########...
output:
0 5024
result:
ok single line: '0 5024'
Test #9:
score: 0
Accepted
time: 5ms
memory: 2528kb
input:
1000 1000 .....................................................................................................................................................................................................................................................#################...............................
output:
3629 0
result:
ok single line: '3629 0'
Test #10:
score: 0
Accepted
time: 10ms
memory: 2556kb
input:
1000 1000 ........................................##########...............................................................................##########..........................................................................................................................................................
output:
944 3746
result:
ok single line: '944 3746'
Test #11:
score: 0
Accepted
time: 3ms
memory: 2468kb
input:
1000 1000 ...................................................................................#################........##############......................................................................................................................................................##############.......
output:
2305 1903
result:
ok single line: '2305 1903'
Test #12:
score: 0
Accepted
time: 7ms
memory: 2528kb
input:
1000 1000 ...........................................................................................................................................................##########................................................................................................................................
output:
258 523
result:
ok single line: '258 523'
Test #13:
score: 0
Accepted
time: 0ms
memory: 2552kb
input:
1000 1000 .....................................................................................................................................................................................................................................................................................................
output:
539 235
result:
ok single line: '539 235'
Test #14:
score: 0
Accepted
time: 7ms
memory: 2448kb
input:
1000 1000 .....................................................................................................................................................................................................................................................................................................
output:
0 1
result:
ok single line: '0 1'
Test #15:
score: 0
Accepted
time: 7ms
memory: 2552kb
input:
1000 1000 .....................................................................................................................................................................................................................................................................................................
output:
1 0
result:
ok single line: '1 0'
Test #16:
score: 0
Accepted
time: 2ms
memory: 1876kb
input:
100 1000 ###################################################################################################################################################################################################################################################################################################...
output:
500 0
result:
ok single line: '500 0'
Test #17:
score: 0
Accepted
time: 2ms
memory: 1664kb
input:
100 1000 ###################################################################################################################################################################################################################################################################################################...
output:
580 0
result:
ok single line: '580 0'
Test #18:
score: 0
Accepted
time: 1ms
memory: 1556kb
input:
100 1000 ###################################################################################################################################################################################################################################################################################################...
output:
0 700
result:
ok single line: '0 700'
Test #19:
score: 0
Accepted
time: 2ms
memory: 1660kb
input:
100 1000 ###################################################################################################################################################################################################################################################################################################...
output:
0 710
result:
ok single line: '0 710'
Test #20:
score: 0
Accepted
time: 0ms
memory: 1732kb
input:
100 1000 ###################################################################################################################################################################################################################################################################################################...
output:
0 700
result:
ok single line: '0 700'
Test #21:
score: 0
Accepted
time: 2ms
memory: 1552kb
input:
100 1000 ##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....
output:
0 710
result:
ok single line: '0 710'
Test #22:
score: 0
Accepted
time: 2ms
memory: 1704kb
input:
100 1000 ###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......#...
output:
0 700
result:
ok single line: '0 700'
Test #23:
score: 0
Accepted
time: 2ms
memory: 1720kb
input:
100 1000 ###################################################################################################################################################################################################################################################################################################...
output:
0 710
result:
ok single line: '0 710'
Test #24:
score: 0
Accepted
time: 2ms
memory: 1704kb
input:
100 1000 .......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###....
output:
0 700
result:
ok single line: '0 700'
Test #25:
score: 0
Accepted
time: 1ms
memory: 1708kb
input:
100 1000 ....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....#######...
output:
0 710
result:
ok single line: '0 710'
Test #26:
score: 0
Accepted
time: 3ms
memory: 2556kb
input:
1000 1000 ##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##########..##...
output:
4316 0
result:
ok single line: '4316 0'
Test #27:
score: 0
Accepted
time: 2ms
memory: 2540kb
input:
1000 1000 ##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##############..##...
output:
0 5146
result:
ok single line: '0 5146'
Test #28:
score: 0
Accepted
time: 9ms
memory: 2552kb
input:
1000 1000 ##################################################################################################################################################################################################################################################################################################...
output:
5800 0
result:
ok single line: '5800 0'
Test #29:
score: 0
Accepted
time: 14ms
memory: 2552kb
input:
1000 1000 ##################################################################################################################################################################################################################################################################################################...
output:
5800 0
result:
ok single line: '5800 0'
Test #30:
score: 0
Accepted
time: 3ms
memory: 2528kb
input:
1000 1000 ##################################################################################################################################################################################################################################################################################################...
output:
0 7100
result:
ok single line: '0 7100'
Test #31:
score: 0
Accepted
time: 13ms
memory: 2544kb
input:
1000 1000 ##################################################################################################################################################################################################################################################################################################...
output:
0 7100
result:
ok single line: '0 7100'
Test #32:
score: 0
Accepted
time: 12ms
memory: 2444kb
input:
1000 1000 ##################################################################################################################################################################################################################################################################################################...
output:
0 7100
result:
ok single line: '0 7100'
Test #33:
score: 0
Accepted
time: 5ms
memory: 2556kb
input:
1000 1000 ##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########...
output:
0 7100
result:
ok single line: '0 7100'
Test #34:
score: 0
Accepted
time: 8ms
memory: 2520kb
input:
1000 1000 ###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###..........
output:
0 7100
result:
ok single line: '0 7100'
Test #35:
score: 0
Accepted
time: 5ms
memory: 2544kb
input:
1000 1000 ##################################################################################################################################################################################################################################################################################################...
output:
0 7100
result:
ok single line: '0 7100'
Test #36:
score: 0
Accepted
time: 5ms
memory: 2552kb
input:
1000 1000 .......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###.......###...
output:
0 7100
result:
ok single line: '0 7100'
Test #37:
score: 0
Accepted
time: 5ms
memory: 2532kb
input:
1000 1000 ....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....##########....######...
output:
0 7100
result:
ok single line: '0 7100'