Submission #1099323

# Submission time Handle Problem Language Result Execution time Memory
1099323 2024-10-11T07:26:57 Z Zflop Bitaro the Brave (JOI19_ho_t1) C++14
0 / 100
22 ms 452 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) x.begin(),x.end()
#define sor(x) sort(all(x))
#define pi pair<int,int>
#define vi vector<int>


int N,M;
vector<string>A;

void solve() {
    cin >> N >> M;
    A = vector<string>(N);
    for (int i = 0; i < N;++i)
        cin >> A[i];
    int cnt = 0;
    for (int i = 0; i < N;++i)
        for (int j = 0; j < N;++j)
            for (int z = i + 1; z < N;++z)
                for (int y = j + 1; y < N;++y)
                    if (A[i][j] == 'J' && A[i][y] == 'O' && A[z][j] == 'I')
                        ++cnt;

    cout << cnt;
}

int main(){
    solve();
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 16 ms 440 KB Output is correct
6 Correct 22 ms 452 KB Output is correct
7 Incorrect 12 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 16 ms 440 KB Output is correct
6 Correct 22 ms 452 KB Output is correct
7 Incorrect 12 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 1 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 344 KB Output is correct
5 Correct 16 ms 440 KB Output is correct
6 Correct 22 ms 452 KB Output is correct
7 Incorrect 12 ms 348 KB Output isn't correct
8 Halted 0 ms 0 KB -