Submission #110394

# Submission time Handle Problem Language Result Execution time Memory
110394 2019-05-10T19:08:56 Z said Bitaro the Brave (JOI19_ho_t1) C++14
20 / 100
1000 ms 640 KB
#include <bits/stdc++.h>

using namespace std;

#define MAXH 3010

int h, w;
string s[MAXH];

int main(){
    cin >> h >> w;
    for(int i = 0; i < h; i++)
        cin >> s[i];

    int cont = 0;
    for(int i = 0; i < h; i++){
        for(int j = 0; j < w; j++){
            if(s[i][j] == 'J'){
                int l = 0;
                for(int e = 0; e < w; e++){
                    if(s[i][e] == 'O'){
                        l = e;
                        int k = 0;
                        for(int x = 0; x < h; x++){
                            if(s[x][j] == 'I'){
                                k = x;
                                if(i < k && j < l){
                                    cont++;
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    cout << cont << "\n";
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 412 KB Output is correct
5 Correct 28 ms 500 KB Output is correct
6 Correct 6 ms 384 KB Output is correct
7 Correct 17 ms 384 KB Output is correct
8 Correct 36 ms 384 KB Output is correct
9 Correct 12 ms 384 KB Output is correct
10 Correct 16 ms 384 KB Output is correct
11 Correct 33 ms 548 KB Output is correct
12 Correct 7 ms 512 KB Output is correct
13 Correct 25 ms 384 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 412 KB Output is correct
5 Correct 28 ms 500 KB Output is correct
6 Correct 6 ms 384 KB Output is correct
7 Correct 17 ms 384 KB Output is correct
8 Correct 36 ms 384 KB Output is correct
9 Correct 12 ms 384 KB Output is correct
10 Correct 16 ms 384 KB Output is correct
11 Correct 33 ms 548 KB Output is correct
12 Correct 7 ms 512 KB Output is correct
13 Correct 25 ms 384 KB Output is correct
14 Execution timed out 1059 ms 640 KB Time limit exceeded
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 384 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 412 KB Output is correct
5 Correct 28 ms 500 KB Output is correct
6 Correct 6 ms 384 KB Output is correct
7 Correct 17 ms 384 KB Output is correct
8 Correct 36 ms 384 KB Output is correct
9 Correct 12 ms 384 KB Output is correct
10 Correct 16 ms 384 KB Output is correct
11 Correct 33 ms 548 KB Output is correct
12 Correct 7 ms 512 KB Output is correct
13 Correct 25 ms 384 KB Output is correct
14 Execution timed out 1059 ms 640 KB Time limit exceeded
15 Halted 0 ms 0 KB -