This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}
cout << (n - 1) * (n - 1) << endl;
for (int k = 0; k < 100; 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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |