| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1357563 | almondmilkcoder | Bitaro the Brave (JOI19_ho_t1) | C++20 | 1094 ms | 8516 KiB |
#include<bits/stdc++.h>
using namespace std;
long long int h, w, i, j, k, l, c, d, ans;
int main(){
cin >> h >> w;
char a[h][w];
for(i = 0; i < h; i++){
for(j = 0; j < w; j++){
cin >> a[i][j];
}
}
for(i = 0; i < h; i++){
for(j = 0; j < w; j++){
if (a[i][j] == 'J'){
for(k = i + 1; k < h; k++){
if (a[k][j] == 'I') c++;
}
for(l = j + 1; l < w; l++){
if (a[i][l] == 'O') d++;
}
ans += c * d;
c = 0;
d = 0;
}
}
}
cout << ans << "\n";
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
