Submission #928489

# Submission time Handle Problem Language Result Execution time Memory
928489 2024-02-16T13:23:25 Z Art_ogo Bitaro the Brave (JOI19_ho_t1) C++17
20 / 100
1000 ms 860 KB
#include <bits/stdc++.h>

#define ll long long
#define fi first
#define se second
#define ve vector
#define all(x) x.begin(), x.end()

using namespace std;

typedef pair<ll, ll> pll;
typedef pair<int, int> pii;

#pragma GCC optimize("O3")

signed main(){
    int n, m;
    cin >> n >> m;
    ve<string> v(n);
    for(auto& i : v)
        cin >> i;
    int res = 0;
    for(int i = 0; i < n; i++)
        for(int j = 0; j < m; j++)
            for(int k = i + 1; k < n; k++)
                for(int l = j + 1; l < m; l++)
                    res += v[i][j] == 'J' && v[i][l] == 'O' && v[k][j] == 'I';

    cout << res;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 8 ms 444 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 11 ms 444 KB Output is correct
8 Correct 8 ms 500 KB Output is correct
9 Correct 4 ms 344 KB Output is correct
10 Correct 11 ms 348 KB Output is correct
11 Correct 10 ms 348 KB Output is correct
12 Correct 3 ms 456 KB Output is correct
13 Correct 11 ms 460 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 8 ms 444 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 11 ms 444 KB Output is correct
8 Correct 8 ms 500 KB Output is correct
9 Correct 4 ms 344 KB Output is correct
10 Correct 11 ms 348 KB Output is correct
11 Correct 10 ms 348 KB Output is correct
12 Correct 3 ms 456 KB Output is correct
13 Correct 11 ms 460 KB Output is correct
14 Execution timed out 1034 ms 860 KB Time limit exceeded
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 8 ms 444 KB Output is correct
6 Correct 2 ms 344 KB Output is correct
7 Correct 11 ms 444 KB Output is correct
8 Correct 8 ms 500 KB Output is correct
9 Correct 4 ms 344 KB Output is correct
10 Correct 11 ms 348 KB Output is correct
11 Correct 10 ms 348 KB Output is correct
12 Correct 3 ms 456 KB Output is correct
13 Correct 11 ms 460 KB Output is correct
14 Execution timed out 1034 ms 860 KB Time limit exceeded
15 Halted 0 ms 0 KB -