Submission #1064656

#TimeUsernameProblemLanguageResultExecution timeMemory
1064656sunboiMake them Meet (EGOI24_makethemmeet)C++14
13.80 / 100
118 ms6224 KiB
#include <bits/stdc++.h> using namespace std; #define int long long signed main(){ int n, m; cin >> n >> m; for (int i = 0; i < m; i++){ int a, b; cin >> a >> b; } if (m == n - 1){ cout << 3 << endl; for (int i = 0; i < n; i++){ cout << 0 << ' '; } cout << endl; cout << 1 << ' ' << 1 << ' '; for (int i = 2; i < n; i++){ cout << 0 << ' '; } cout << endl; for (int i = 0; i < n; i++){ cout << 0 << ' '; } cout << endl; }else{ cout << 200 * (n - 1) << endl; for (int k = 0; k < 200; k++){ for (int i = 0; i < n - 1; i++){ if (i == n - 1){ cout << n - 2 << ' '; } for (int j = 0; j < n; j++){ if (i == j){ if (i == n - 1) break; else cout << j << ' ' << j << ' '; j++; }else cout << j << ' '; } cout << endl; } cout << endl; } } return 0; }
#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...