답안 #1099324

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1099324 2024-10-11T07:28:14 Z Zflop Bitaro the Brave (JOI19_ho_t1) C++14
20 / 100
1000 ms 856 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 < M;++j)
            for (int z = i + 1; z < N;++z)
                for (int y = j + 1; y < M;++y)
                    if (A[i][j] == 'J' && A[i][y] == 'O' && A[z][j] == 'I')
                        ++cnt;

    cout << cnt;
}

int main(){
    solve();
    return 0;
}
# 결과 실행 시간 메모리 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 15 ms 348 KB Output is correct
6 Correct 9 ms 444 KB Output is correct
7 Correct 15 ms 452 KB Output is correct
8 Correct 16 ms 444 KB Output is correct
9 Correct 10 ms 348 KB Output is correct
10 Correct 13 ms 460 KB Output is correct
11 Correct 15 ms 456 KB Output is correct
12 Correct 10 ms 460 KB Output is correct
13 Correct 16 ms 348 KB Output is correct
# 결과 실행 시간 메모리 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 15 ms 348 KB Output is correct
6 Correct 9 ms 444 KB Output is correct
7 Correct 15 ms 452 KB Output is correct
8 Correct 16 ms 444 KB Output is correct
9 Correct 10 ms 348 KB Output is correct
10 Correct 13 ms 460 KB Output is correct
11 Correct 15 ms 456 KB Output is correct
12 Correct 10 ms 460 KB Output is correct
13 Correct 16 ms 348 KB Output is correct
14 Execution timed out 1034 ms 856 KB Time limit exceeded
15 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 15 ms 348 KB Output is correct
6 Correct 9 ms 444 KB Output is correct
7 Correct 15 ms 452 KB Output is correct
8 Correct 16 ms 444 KB Output is correct
9 Correct 10 ms 348 KB Output is correct
10 Correct 13 ms 460 KB Output is correct
11 Correct 15 ms 456 KB Output is correct
12 Correct 10 ms 460 KB Output is correct
13 Correct 16 ms 348 KB Output is correct
14 Execution timed out 1034 ms 856 KB Time limit exceeded
15 Halted 0 ms 0 KB -