QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#671713 | #2880. Letters Q and F | Folity# | WA | 0ms | 3536kb | C++20 | 535b | 2024-10-24 14:09:37 | 2024-10-24 14:09:37 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=305;
int n,m;
string a[N];
bool chk(int i,int j){
return i>=0&&i<n&&j>=0&&j<m&&a[i][j]=='#';
}
int main(){
cin>>n>>m;
for(int i=0;i<n;++i)cin>>a[i];
int cnt=0,sum=0;
for(int i=0;i<n;++i)
for(int j=0;j<m;++j)if(a[i][j]=='#'){
++sum;
if(chk(i,j+1)&&chk(i,j+2)&&chk(i+1,j)&&chk(i+2,j)&&chk(i+2,j+1)&&!chk(i+1,j+1))++cnt;
}
cout<<(10*cnt-sum)/2<<' '<<(sum-8*cnt)/2<<'\n';
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3536kb
input:
5 3 ### #.# ### ..# ..#
output:
0 1
result:
wrong answer 1st lines differ - expected: '1 0', found: '0 1'