QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#333462 | #2880. Letters Q and F | ayazashy | WA | 0ms | 3672kb | C++23 | 880b | 2024-02-19 22:22:54 | 2024-02-19 22:22:55 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n,m;
cin>>n>>m;
char arr[n][m];
int f =0,q=0;
for(int i=0; i<n; i++)
{
for(int j=0; j<m; j++)
{
cin>>arr[i][j];
}
}
for(int j=0; j<m-2; j++)
{
for(int i=0; i<n-4; i++)
{
if(arr[i][j]=='#' && arr[i][j+1]=='#' && arr[i][j+2]=='#' && arr[i+1][j]=='#' && arr[i+2][j]=='#' && arr[i+2][j+1]=='#' && arr[i+3][j]=='#' && arr[i+4][j]=='#')
{
f++;
}
if(arr[i][j]=='#' && arr[i][j+1]=='#' && arr[i][j+2]=='#' && arr[i+1][j]=='#' && arr[i+1][j+2]=='#' && arr[i+2][j]=='#' && arr[i+2][j+1]=='#' && arr[i+2][j+2]=='#' && arr[i+3][j+2]=='#' &&arr[i+4][j+2]=='#')
{
q++;
}
}
}
cout<<q<<" "<<f;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3580kb
input:
5 3 ### #.# ### ..# ..#
output:
1 0
result:
ok single line: '1 0'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
5 3 ### #.. ##. #.. #..
output:
0 1
result:
ok single line: '0 1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
5 8 ###..### #.#..#.. ###..##. ..#..#.. ..#..#..
output:
1 1
result:
ok single line: '1 1'
Test #4:
score: -100
Wrong Answer
time: 0ms
memory: 3580kb
input:
8 8 .....### ###..#.# #.###### ###.#### #.###.## #.#.###. ..#...#. ......#.
output:
3 2
result:
wrong answer 1st lines differ - expected: '2 2', found: '3 2'