| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 582700 | hibiki | Bitaro the Brave (JOI19_ho_t1) | C++11 | 236 ms | 53252 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
int h,w;
char wd[3005][3005];
int orb[3005][3005];
long long ans = 0;
int main()
{
    scanf("%d %d",&h,&w);
    for(int i = 0; i < h; i++)
    {
        scanf("%s",wd[i]);
        for(int j = w - 1; j >= 0; j--)
        {
            orb[i][j] = orb[i][j + 1];
            if(wd[i][j] == 'O')
                orb[i][j]++;
        }
    }
    for(int j = 0; j < w; j++)
    {
        int in = 0;
        for(int i = h - 1; i >= 0; i--)
        {
            if(wd[i][j] == 'I') in++;
            if(wd[i][j] == 'J') ans += in * orb[i][j];
        }
    }
    printf("%lld\n",ans);
    return 0;
}
Compilation message (stderr)
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
