Submission #590742

# Submission time Handle Problem Language Result Execution time Memory
590742 2022-07-06T10:02:12 Z Jakub_Wozniak Coins (LMIO19_monetos) C++14
11.789 / 100
17 ms 936 KB
#include <bits/stdc++.h>
using namespace std;

int main()
{
	int T,K1,K2, N;
	cin >> T >> N >> K1 >> K2;
	int plansza[N+1][N+1];
	for(int i=0;i<N;i++)
	{
		for(int j=0;j<N;j++)
		{
			cin >> plansza[i][j];
		}
	}
	long long int wynik1=0,wynik2=0;
	for(int i=0;i<N/2;i++)
	{
		for(int j=0;j<N;j++)
		{
			if(plansza[i][j]==1){ wynik1++;}
		}
	}
	for(int i=0;i<N;i++)
	{
		for(int j=0;j<N/2;j++)
		{
			if(plansza[i][j]==1){ wynik2++;}
		}
	}
	
	if(wynik1 < wynik2)
	{
		for(int i=0;i<N/2;i++)
		{
			for(int j=0;j<N;j++)
			{
				cout << "0 ";
			}
			cout << "\n";
		}
		for(int i=N/2;i<N;i++)
		{
			for(int j=0;j<N;j++)
			{
				cout << "1 ";
			}
			cout << "\n";
		}
	}
	
	else
	{
		for(int i=0;i<N;i++)
		{
			for(int j=0;j<N/2;j++)
			{
				cout << "0 ";
			}
			for(int j=0;j<N/2;j++)
			{
				cout << "1 ";
			}
			cout << "\n";
		}
	}
	return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB K = 24
2 Incorrect 1 ms 212 KB K = 623
3 Partially correct 15 ms 852 KB K = 20313
4 Partially correct 17 ms 860 KB K = 23205
5 Partially correct 16 ms 900 KB K = 18430
6 Partially correct 16 ms 840 KB K = 22273
7 Partially correct 15 ms 852 KB K = 22537
8 Partially correct 15 ms 896 KB K = 20045
9 Partially correct 15 ms 852 KB K = 21031
10 Partially correct 15 ms 936 KB K = 22367