Submission #140850

# Submission time Handle Problem Language Result Execution time Memory
140850 2019-08-05T17:14:00 Z Sarah_Mokhtar Bitaro the Brave (JOI19_ho_t1) C++14
20 / 100
1000 ms 1784 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=3e3+10;
int n,m,ans;
char grid[N][N];
int main(){
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
    cin>>n>>m;
    for(int i=0;i<n;++i)
        for(int j=0;j<m;++j)
            cin>>grid[i][j];
    for(int i=0;i<n;++i){
        for(int j=0;j<m;++j){
            for(int k=0;k<i;++k){
                for(int l=0;l<j;++l){
                    if(grid[k][l]=='J'&&grid[k][j]=='O'&&grid[i][l]=='I') ++ans;
                }
            }
        }
    }
    cout<<ans;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 125 ms 632 KB Output is correct
6 Correct 17 ms 632 KB Output is correct
7 Correct 30 ms 632 KB Output is correct
8 Correct 125 ms 632 KB Output is correct
9 Correct 21 ms 632 KB Output is correct
10 Correct 30 ms 760 KB Output is correct
11 Correct 140 ms 760 KB Output is correct
12 Correct 20 ms 632 KB Output is correct
13 Correct 30 ms 632 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 125 ms 632 KB Output is correct
6 Correct 17 ms 632 KB Output is correct
7 Correct 30 ms 632 KB Output is correct
8 Correct 125 ms 632 KB Output is correct
9 Correct 21 ms 632 KB Output is correct
10 Correct 30 ms 760 KB Output is correct
11 Correct 140 ms 760 KB Output is correct
12 Correct 20 ms 632 KB Output is correct
13 Correct 30 ms 632 KB Output is correct
14 Execution timed out 1066 ms 1784 KB Time limit exceeded
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 125 ms 632 KB Output is correct
6 Correct 17 ms 632 KB Output is correct
7 Correct 30 ms 632 KB Output is correct
8 Correct 125 ms 632 KB Output is correct
9 Correct 21 ms 632 KB Output is correct
10 Correct 30 ms 760 KB Output is correct
11 Correct 140 ms 760 KB Output is correct
12 Correct 20 ms 632 KB Output is correct
13 Correct 30 ms 632 KB Output is correct
14 Execution timed out 1066 ms 1784 KB Time limit exceeded
15 Halted 0 ms 0 KB -