| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 465073 | ardaak33 | Bitaro the Brave (JOI19_ho_t1) | C++17 | 421 ms | 83876 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;
string s[3005];
int tahtayan[3005][3005];
int tahtadik[3005][3005];
long long int sonuc=0;
int main() {
int n,m;
cin >> n >> m;
for (int i = 1; i <= n; i++)
{
    cin >> s[i];
    for (int j = 1; j <= m; j++)
    {
        if(s[i][j-1]=='O')
        tahtayan[i][j]=tahtayan[i][j-1]+1;
        else
        tahtayan[i][j]=tahtayan[i][j-1];
        if(s[i][j-1]=='I')
        tahtadik[j][i]=tahtadik[j][i-1]+1;
        else
        tahtadik[j][i]=tahtadik[j][i-1];
    }
    
}
for (int i = 1; i <= n; i++)
    for (int j = 0; j < m; j++)
        if(s[i][j]=='J')
        sonuc+=(tahtayan[i][m]-tahtayan[i][j+1])*(tahtadik[j+1][n]-tahtadik[j+1][i]);
    cout <<sonuc;
    
}
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... | ||||
