Submission #786125

# Submission time Handle Problem Language Result Execution time Memory
786125 2023-07-18T04:20:06 Z vjudge1 Coins (LMIO19_monetos) C++17
10.0198 / 100
8 ms 980 KB
#include<bits/stdc++.h>
using namespace std;
int t, n, k1, k2;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin >> t >> n >> k1 >> k2;
	int grid[n][n], res[n][n];
	for(int i=0; i<n; i++){
		for(int j=0; j<n; j++){
			cin >> grid[i][j];
		}
	}
	for(int i=0; i<n; i++){
		for(int j=0; j<n; j++){
			if(j) cout << " ";
			if(i+j<n-1){
				cout << "0";
			}else if(i+j>n-1){
				cout << "1";
			}else{
				if(i<n/2){
					cout << "0";
				}else{
					cout << "1";
				}
			}
		}
		cout << endl;
	}
}

Compilation message

monetos.cpp: In function 'int main()':
monetos.cpp:11:18: warning: unused variable 'res' [-Wunused-variable]
   11 |  int grid[n][n], res[n][n];
      |                  ^~~
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB K = 22
2 Incorrect 1 ms 332 KB K = 629
3 Partially correct 7 ms 920 KB K = 20155
4 Partially correct 8 ms 852 KB K = 23377
5 Partially correct 7 ms 852 KB K = 18576
6 Partially correct 7 ms 980 KB K = 22065
7 Partially correct 7 ms 920 KB K = 22427
8 Incorrect 8 ms 852 KB K = 22416
9 Incorrect 7 ms 980 KB K = 22102
10 Partially correct 7 ms 852 KB K = 22112