Submission #493635

# Submission time Handle Problem Language Result Execution time Memory
493635 2021-12-12T12:44:23 Z watoKE Bitaro the Brave (JOI19_ho_t1) C++17
0 / 100
1 ms 332 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=1;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 0 ms 204 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Incorrect 0 ms 332 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Incorrect 0 ms 332 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 204 KB Output is correct
2 Correct 0 ms 304 KB Output is correct
3 Correct 1 ms 204 KB Output is correct
4 Incorrect 0 ms 332 KB Output isn't correct
5 Halted 0 ms 0 KB -