Submission #1099446

# Submission time Handle Problem Language Result Execution time Memory
1099446 2024-10-11T10:06:06 Z mihaihvh Bitaro the Brave (JOI19_ho_t1) C++14
0 / 100
0 ms 348 KB
#include <fstream>
#include <set>
#include <queue>
#include <vector>
#include <cmath>
#include <algorithm>

using namespace std;

ifstream cin("in.in");
ofstream cout("out.out");

char v[501][501];

set<vector<int>> sol;

int main() {
    int n, m, ans = 0;
    cin >> n >> m;
    for (int i = 1; i <= n; ++i)
        for (int j = 1; j <= m; ++j)
            cin >> v[i][j];

    for (int i = 1; i <= n; ++i) {
        for (int j = 1; j <= m; ++j) {
            if (v[i][j] == 'J') {
                for (int k = 1; k <= n; ++k) {
                    if (v[k][j] == 'I') {
                        for (int l = 1; l <= m; ++l) {
                            if (v[i][l] == 'O' && i < k && j < l) {
                                ++ans;
                            }
                        }
                    }
                }
            }
        }
    }
    cout << ans;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -