# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
913480 | 2024-01-20T08:04:58 Z | ashkan_ahmadi_koni | Bitaro the Brave (JOI19_ho_t1) | C++17 | 1000 ms | 2848 KB |
/* In The Name Of God */ #include <bits/stdc++.h> using namespace std; #define int long long #define sw sync_with_stdio #pragma GCC optimize("Ofast, unroll-loops, O3") #define fast ios::sw(0),cin.tie(0),cout.tie(0); const int N = 3e3 + 3, M = 1e9 + 7, inf = 1e18 + 8; int h, w, ans; char a[N][N]; signed main() { fast; cin >> h >> w; for (int i = 1; i <= h; ++i) for (int j = 1; j <= w; ++j) cin >> a[i][j]; for (int i = 1; i <= h; ++i) for (int j = 1; j <= w; ++j) for (int k = i + 1; k <= h; ++k) for (int l = j + 1; l <= w; ++l) if (a[i][j] == 'J' && a[i][l] == 'O' && a[k][j] == 'I') ans++; cout << ans << '\n'; } /* .---. . .--. | | | ) o |--- .--.|--. |--: . ---. | `--.| | | ) | .' '---'`--'' `-'--'-' `-'--- */
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 8 ms | 2648 KB | Output is correct |
6 | Correct | 2 ms | 2652 KB | Output is correct |
7 | Correct | 12 ms | 2848 KB | Output is correct |
8 | Correct | 8 ms | 2804 KB | Output is correct |
9 | Correct | 5 ms | 2648 KB | Output is correct |
10 | Correct | 16 ms | 2696 KB | Output is correct |
11 | Correct | 12 ms | 2652 KB | Output is correct |
12 | Correct | 3 ms | 2648 KB | Output is correct |
13 | Correct | 10 ms | 2652 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 8 ms | 2648 KB | Output is correct |
6 | Correct | 2 ms | 2652 KB | Output is correct |
7 | Correct | 12 ms | 2848 KB | Output is correct |
8 | Correct | 8 ms | 2804 KB | Output is correct |
9 | Correct | 5 ms | 2648 KB | Output is correct |
10 | Correct | 16 ms | 2696 KB | Output is correct |
11 | Correct | 12 ms | 2652 KB | Output is correct |
12 | Correct | 3 ms | 2648 KB | Output is correct |
13 | Correct | 10 ms | 2652 KB | Output is correct |
14 | Execution timed out | 1051 ms | 2652 KB | Time limit exceeded |
15 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 1 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 344 KB | Output is correct |
5 | Correct | 8 ms | 2648 KB | Output is correct |
6 | Correct | 2 ms | 2652 KB | Output is correct |
7 | Correct | 12 ms | 2848 KB | Output is correct |
8 | Correct | 8 ms | 2804 KB | Output is correct |
9 | Correct | 5 ms | 2648 KB | Output is correct |
10 | Correct | 16 ms | 2696 KB | Output is correct |
11 | Correct | 12 ms | 2652 KB | Output is correct |
12 | Correct | 3 ms | 2648 KB | Output is correct |
13 | Correct | 10 ms | 2652 KB | Output is correct |
14 | Execution timed out | 1051 ms | 2652 KB | Time limit exceeded |
15 | Halted | 0 ms | 0 KB | - |