# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
590576 | Jakub_Wozniak | Coins (LMIO19_monetos) | C++14 | 26 ms | 980 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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];
}
}
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 |
---|---|---|---|---|
Fetching results... |