Submission #786125

#TimeUsernameProblemLanguageResultExecution timeMemory
786125vjudge1Coins (LMIO19_monetos)C++17
10.02 / 100
8 ms980 KiB
#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 (stderr)

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 timeMemoryGrader output
Fetching results...