| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1357565 | gvancak | Bitaro the Brave (JOI19_ho_t1) | C++20 | 1095 ms | 11644 KiB |
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n,m,ans=0;
cin >> n >> m;
string a[n+1];
for(int i=0;i<n;i++) {
cin >> a[i];
}
for(int i=0;i<n;i++) {
for(int j=0;j<m;j++) {
if(a[i][j]=='J') {
int ocnt=0;
int icnt=0;
for(int k=j;k<m;k++) {
if(a[i][k]=='O') ocnt++;
}
for(int k=i;k<n;k++) {
if(a[k][j]=='I') icnt++;
}
ans+=ocnt*icnt;
}
}
}
cout << ans << endl;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
