| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1355470 | gvancak | Bitaro the Brave (JOI19_ho_t1) | C++20 | 9 ms | 6540 KiB |
// sandro
#include <bits/stdc++.h>
using namespace std;
int i1[3005][3005],o[3005][3005];
int main() {
int w,h;
cin>>w>>h;
char a[w][h];
int ans=0;
for(int i=0;i<w;i++){
for(int j=0;j<h;j++){
cin>>a[i][j];
}
}
for(int i=0;i<w;i++){
for(int j=h-1;j>=0;j--){
o[i][j]=o[i][j+1];
if(a[i][j]=='O')o[i][j]++;
}
}
for(int i=w-1;i>=0;i--){
for(int j=0;j<h;j++){
i1[i][j]=i1[i+1][j];
if(a[i][j]=='I')i1[i][j]++;
}
}
for(int i=0;i<w;i++){
for(int j=0;j<h;j++){
if(a[i][j]=='J')ans+=i1[i][j]*o[i][j];
}
}
cout<<ans;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
