# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1048413 | 2024-08-08T07:27:16 Z | 이온조(#11092) | Make them Meet (EGOI24_makethemmeet) | C++17 | 0 ms | 352 KB |
#include <bits/stdc++.h> using namespace std; vector<int> V[111], G[111]; int main() { int N, M; scanf("%d%d", &N, &M); for(int i=0; i<M; i++) { int u, v; scanf("%d%d", &u, &v); G[u].push_back(v); G[v].push_back(u); } for(int i=1; i<N; i++) { for(int j=0; j<N; j++) { if(j == 0 || i == j) V[i].push_back(1); else V[i].push_back(2); } } vector<vector<int>> ans; for(int i=1; i<N; i++) { for(int t=0; t<2; t++) ans.push_back(V[i]); } for(int i=1; i<N; i++) { ans.push_back(V[i]); for(int j=1; j<N; j++) for(int t=0; t<2; t++) if(i != j) ans.push_back(V[i]); ans.push_back(V[i]); } printf("%d\n", ans.size()); for(auto &it: ans) { for(auto jt: it) printf("%d ", jt); puts(""); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 352 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | If people start at 1 and 2, then they can avoid each other |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | If people start at 1 and 2, then they can avoid each other |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | If people start at 0 and 2, then they can avoid each other |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 352 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | If people start at 1 and 2, then they can avoid each other |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 352 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | If people start at 1 and 2, then they can avoid each other |
3 | Halted | 0 ms | 0 KB | - |