| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1355469 | gvancak | Bitaro the Brave (JOI19_ho_t1) | C++20 | 1096 ms | 11608 KiB |
//oto
#include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
int h, w;
cin >> h >> w;
vector<string> a(h);
for (int i = 0; i < h; i++) cin >> a[i];
ll r = 0;
for (int i = 0; i < h; i++)
{
for (int k = i + 1; k < h; k++)
{
vector<int> o(w + 1, 0);
for (int j = w - 1; j >= 0; j--)
{
o[j] = o[j + 1] + (a[i][j] == 'O');
}
for(int j=0; j < w;j++)
{
if(a[i][j]=='J' && a[k][j]=='I') r+=o[j+1];
}
}
}
cout<< r <<endl;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
