| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1345072 | FaresSTH | Bitaro the Brave (JOI19_ho_t1) | C++20 | 126 ms | 9248 KiB |
#include"bits/stdc++.h"
using namespace std;
using ll=long long;
#define S second
#define F first
int main(){
cin.tie(0)->sync_with_stdio(0);
int n,m;
cin>>n>>m;
int c[m]={};
char g[n][m];
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
cin>>g[i][j];
if(g[i][j]=='I')c[j]++;
}
}
ll res=0;
for(int i=0;i<n;i++){
ll cn=0;
for(int j=m-1;j>=0;j--){
if(g[i][j]=='I')c[j]--;
else if(g[i][j]=='O')cn++;
else res+=cn*c[j];
}
}
cout<<res;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
