| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 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;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
