Submission #493732

# Submission time Handle Problem Language Result Execution time Memory
493732 2021-12-12T17:55:18 Z watoKE Bitaro the Brave (JOI19_ho_t1) C++17
20 / 100
13 ms 4172 KB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;

int t,n,a,b,cvp,dgr;
char dizi2[3005][3005];
vector<pair<int,int> > v;
vector<int> vo[3005],vi[3005];
int dp[3005];
int dizi[3005][3005];
string s[3005];
int o,iler;

int main()
{
    cin>>a>>b;
    for (int i=1;i<=a;i++)
    {
        cin>>s[i];
        o=0;
        for (int j=b-1;j>=0;j--)
        {
            if (s[i][j]=='O')
                o++;
            if (s[i][j]=='J')
                dizi[i][j]=o;
        }
    }
    for (int i=0;i<b;i++)
    {
        iler=0;
        for (int j=a;j>=0;j--)
        {
            if (s[j][i]=='I')
                iler++;
            if (s[j][i]=='J')
                cvp+=dizi[j][i]*iler;
        }
    }
    cout<<cvp;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 460 KB Output is correct
2 Correct 1 ms 460 KB Output is correct
3 Correct 1 ms 460 KB Output is correct
4 Correct 1 ms 588 KB Output is correct
5 Correct 1 ms 972 KB Output is correct
6 Correct 1 ms 924 KB Output is correct
7 Correct 1 ms 928 KB Output is correct
8 Correct 1 ms 972 KB Output is correct
9 Correct 1 ms 972 KB Output is correct
10 Correct 1 ms 844 KB Output is correct
11 Correct 1 ms 972 KB Output is correct
12 Correct 1 ms 972 KB Output is correct
13 Correct 2 ms 844 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 460 KB Output is correct
2 Correct 1 ms 460 KB Output is correct
3 Correct 1 ms 460 KB Output is correct
4 Correct 1 ms 588 KB Output is correct
5 Correct 1 ms 972 KB Output is correct
6 Correct 1 ms 924 KB Output is correct
7 Correct 1 ms 928 KB Output is correct
8 Correct 1 ms 972 KB Output is correct
9 Correct 1 ms 972 KB Output is correct
10 Correct 1 ms 844 KB Output is correct
11 Correct 1 ms 972 KB Output is correct
12 Correct 1 ms 972 KB Output is correct
13 Correct 2 ms 844 KB Output is correct
14 Correct 13 ms 3660 KB Output is correct
15 Correct 2 ms 2124 KB Output is correct
16 Correct 7 ms 2216 KB Output is correct
17 Correct 1 ms 544 KB Output is correct
18 Correct 11 ms 4172 KB Output is correct
19 Correct 8 ms 3404 KB Output is correct
20 Incorrect 9 ms 3528 KB Output isn't correct
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 460 KB Output is correct
2 Correct 1 ms 460 KB Output is correct
3 Correct 1 ms 460 KB Output is correct
4 Correct 1 ms 588 KB Output is correct
5 Correct 1 ms 972 KB Output is correct
6 Correct 1 ms 924 KB Output is correct
7 Correct 1 ms 928 KB Output is correct
8 Correct 1 ms 972 KB Output is correct
9 Correct 1 ms 972 KB Output is correct
10 Correct 1 ms 844 KB Output is correct
11 Correct 1 ms 972 KB Output is correct
12 Correct 1 ms 972 KB Output is correct
13 Correct 2 ms 844 KB Output is correct
14 Correct 13 ms 3660 KB Output is correct
15 Correct 2 ms 2124 KB Output is correct
16 Correct 7 ms 2216 KB Output is correct
17 Correct 1 ms 544 KB Output is correct
18 Correct 11 ms 4172 KB Output is correct
19 Correct 8 ms 3404 KB Output is correct
20 Incorrect 9 ms 3528 KB Output isn't correct
21 Halted 0 ms 0 KB -