# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
913555 | ashkan_ahmadi_koni | Bitaro the Brave (JOI19_ho_t1) | C++17 | 1037 ms | 5824 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/* 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];
vector <pair<int, int>> ii, jj, oo;
signed main() {
fast; cin >> h >> w;
for (int i = 1; i <= h; ++i)
for (int j = 1; j <= w; ++j) {
cin >> a[i][j];
if (a[i][j] == 'I')
ii.push_back({i, j});
else if (a[i][j] == 'J')
jj.push_back({i, j});
else
oo.push_back({i, j});
}
for (auto[i, j] : jj)
for (auto [x, y] : oo)
if (x == i && j < y)
for (auto [a, b] : ii)
if (b == j && i < a) {
ans++;
// cout << i << ' ' << j << ' ' << a << ' ' << y << '\n';
}
cout << ans << '\n';
}
/*
.---. . .--.
| | | ) o
|--- .--.|--. |--: . ---.
| `--.| | | ) | .'
'---'`--'' `-'--'-' `-'---
*/
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |