Submission #1151736

#TimeUsernameProblemLanguageResultExecution timeMemory
1151736AbdullahIshfaqMake them Meet (EGOI24_makethemmeet)C++20
0 / 100
0 ms328 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define MOD 998244353 void solve(){ ll n, m, u , v; cin >> n >> m; for(int i = 0; i < m; i++){ cin >> u >> v; } cout << 2 * n - 1 << '\n'; for(int i = 1; i < n ; i++){ for(int j = 0 ; j < n; j ++){ if(i == j){ cout << 0 << " "; } else{ cout << 1 << " "; } } cout << '\n'; for(int j = 0 ; j < n; j ++){ if(i == j){ cout << 0 << " "; } else{ cout << 1 << " "; } } cout << '\n'; } for(int i = 0; i < n; i++){ cout << 0 << " "; } } int main() { ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0); int tests = 1; // cin >> tests; for(int i = 1; i <= tests; i ++) solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...