Submission #290479

# Submission time Handle Problem Language Result Execution time Memory
290479 2020-09-03T21:44:47 Z matheo_apd Chessboard (IZhO18_chessboard) C++14
0 / 100
139 ms 1912 KB
#include <bits/stdc++.h>
using namespace std;
#define maxn 105
int chess[maxn][maxn];
int main(){
	int n, k;
	cin >> n >> k;
	for(int i = 0; i < k; i++){
		int x, y;
		cin >> x >> y;
		cin >> x >> y; //8)
		
	}
	int cont_errado = 0;
	for(int i = 1; i <= n; i++)
		for(int j = 1; j <= n; j++)
			if((i+j)%2 == chess[i][j]) cont_errado++;
	cout << min(cont_errado, n*n - cont_errado) << endl;
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 0 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 139 ms 1912 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 256 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 139 ms 1912 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 256 KB Output is correct
2 Incorrect 0 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -