| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1336365 | goulthen | Make them Meet (EGOI24_makethemmeet) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for (int i = a; i <= b; i++)
#define per(i,a,b) for (int i = a; i >= b; i--)
#define pb push_back
#define all(v) (v).begin(), (v).end()
const int MAXN = 110;
vector<int> g[MAXN];
int a[MAXN];
int main() {
ios_base::sync_with_stdio(0);cin.tie(nullptr);
int n,m; cin >> n >> m;
rep(i,1,m) {
int u, v; cin >> u >> v;
g[u].pb(v);
g[v].pb(u);
}
rep(j,1,n) a[j] = j-1;
cout << n+1 << endl;
rep(i,1,n) cout << "0 ";
cut << endl;
rep(j,1,n) {
a[j] = 0;
if(j>1) a[j-2] = j-3;
rep(i,1,n) cout << a[i] << " \n"[i==n];
}
return 0;
}
