Submission #493639

# Submission time Handle Problem Language Result Execution time Memory
493639 2021-12-12T12:45:38 Z watoKE Bitaro the Brave (JOI19_ho_t1) C++17
20 / 100
1000 ms 2476 KB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;

int t,n,a,b,cvp;
char dizi[3005][3005];
vector<pair<int,int> > v;

int main()
{
    cin>>a>>b;
    for (int i=1;i<=a;i++)
    {
        for (int j=1;j<=b;j++)
        {
            cin>>dizi[i][j];
            if (dizi[i][j]=='J')
                v.pb({i,j});
        }
    }
    for (int i=0;i<v.size();i++)
    {
        //cout<<v[i].first<<" "<<v[i].second<<endl;
        for (int j=v[i].second;j<=b;j++)
        {
            if (dizi[v[i].first][j]=='O')
            {
                for (int z=v[i].first;z<=a;z++)
                {
                    if (dizi[z][v[i].second]=='I')
                        cvp++;
                }
            }
        }

    }
    cout<<cvp;
    return 0;
}

Compilation message

joi2019_ho_t1.cpp: In function 'int main()':
joi2019_ho_t1.cpp:22:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   22 |     for (int i=0;i<v.size();i++)
      |                  ~^~~~~~~~~
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 9 ms 564 KB Output is correct
6 Correct 1 ms 588 KB Output is correct
7 Correct 11 ms 564 KB Output is correct
8 Correct 9 ms 560 KB Output is correct
9 Correct 4 ms 588 KB Output is correct
10 Correct 13 ms 588 KB Output is correct
11 Correct 12 ms 588 KB Output is correct
12 Correct 2 ms 588 KB Output is correct
13 Correct 12 ms 640 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 9 ms 564 KB Output is correct
6 Correct 1 ms 588 KB Output is correct
7 Correct 11 ms 564 KB Output is correct
8 Correct 9 ms 560 KB Output is correct
9 Correct 4 ms 588 KB Output is correct
10 Correct 13 ms 588 KB Output is correct
11 Correct 12 ms 588 KB Output is correct
12 Correct 2 ms 588 KB Output is correct
13 Correct 12 ms 640 KB Output is correct
14 Execution timed out 1078 ms 2476 KB Time limit exceeded
15 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 9 ms 564 KB Output is correct
6 Correct 1 ms 588 KB Output is correct
7 Correct 11 ms 564 KB Output is correct
8 Correct 9 ms 560 KB Output is correct
9 Correct 4 ms 588 KB Output is correct
10 Correct 13 ms 588 KB Output is correct
11 Correct 12 ms 588 KB Output is correct
12 Correct 2 ms 588 KB Output is correct
13 Correct 12 ms 640 KB Output is correct
14 Execution timed out 1078 ms 2476 KB Time limit exceeded
15 Halted 0 ms 0 KB -