Submission #110321

# Submission time Handle Problem Language Result Execution time Memory
110321 2019-05-10T17:21:59 Z pamaj Bitaro the Brave (JOI19_ho_t1) C++14
0 / 100
3 ms 384 KB
#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e2 + 10;

int numO[maxn];

int main()
{
	char tab[maxn][maxn];

	int H, W;

	cin >> H >> W;

	for(int i = 0; i < H; i++)
	{
		for(int j = 0; j < W; j++)
		{
			cin >> tab[i][j];
		}
	}

	for(int i = 0; i < H; i++)
	{
		for(int j = 0; j < W; j++)
		{
			if(tab[i][j] == 'O') numO[i]++;
		}
	}

	int cont = 0;

	for(int i = 0; i < H - 1; i++)
	{
		for(int k = i + 1; k < H; k++)
		{
			for(int j = 0; j < W; j++)
			{
				if(tab[i][j] == 'J' and tab[k][j] == 'I')
					cont += numO[i];
			}
		}
	}

	cout << cont << "\n";
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 3 ms 384 KB Output is correct
4 Incorrect 2 ms 256 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 3 ms 384 KB Output is correct
4 Incorrect 2 ms 256 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 384 KB Output is correct
3 Correct 3 ms 384 KB Output is correct
4 Incorrect 2 ms 256 KB Output isn't correct
5 Halted 0 ms 0 KB -