| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1355468 | gvancak | Bitaro the Brave (JOI19_ho_t1) | C++20 | 129 ms | 11848 KiB |
//nugi
#include <bits/stdc++.h>
using namespace std;
int main() {
int h, w;
cin >> h >> w;
vector<string> s(h);
for (int i = 0; i < h; i++) {
cin >> s[i];
}
vector<int> b(w, 0);
long long pas = 0;
for (int i=h-1; i >= 0; i--) {
int a = 0;
for (int j = w-1; j >= 0; j--) {
if (s[i][j] == 'I') {
b[j]++;
}
}
for (int j=w-1; j >= 0; j--) {
if (s[i][j] == 'J') {
pas += a * b[j];
}
if (s[i][j] == 'O') {
a++;
}
}
}
cout << pas;
}| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
