# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1058651 | 2024-08-14T11:45:29 Z | kachim2 | Make them Meet (EGOI24_makethemmeet) | C++17 | 4 ms | 604 KB |
#include<bits/stdc++.h> using namespace std; vector<vector<int>> graph; int n, m; void pathlike(){ cout << "600\n"; for(int i = 0; i < 600; i++){ for(int j = 0; j < n; j++){ cout << (j+(i%2))/2 << ' '; } cout << '\n'; } } void star(){ cout << 3 << '\n'; cout << 1 << ' ' << 1 << ' '; for(int i = 2; i < n; i++){ cout << 1 << ' '; } cout << '\n'; cout << 0 << ' ' << 0 << ' '; for(int i = 2; i < n; i++){ cout << 1 << ' '; } cout << '\n'; cout << 1 << ' ' << 1 << ' '; for(int i = 2; i < n; i++){ cout << 1 << ' '; } } int main(){ cin >> n >> m; graph.resize(n); for(int i = 0; i < m; i++){ int x, y; cin >> x >> y; graph[x].push_back(y); graph[y].push_back(x); } if(graph[0].size() == n-1 && graph[1].size() == 1){ star(); }else{ pathlike(); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 1 ms | 348 KB | Output is correct |
7 | Correct | 1 ms | 348 KB | Output is correct |
8 | Correct | 2 ms | 348 KB | Output is correct |
9 | Correct | 4 ms | 572 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 344 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 1 ms | 348 KB | Output is correct |
5 | Correct | 3 ms | 468 KB | Output is correct |
6 | Correct | 3 ms | 604 KB | Output is correct |
7 | Correct | 2 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Correct | 3 ms | 468 KB | Output is correct |
11 | Correct | 3 ms | 604 KB | Output is correct |
12 | Correct | 2 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 348 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 348 KB | Output is correct |
17 | Correct | 0 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 1 ms | 344 KB | Output is correct |
20 | Correct | 1 ms | 348 KB | Output is correct |
21 | Correct | 4 ms | 480 KB | Output is correct |
22 | Correct | 3 ms | 604 KB | Output is correct |
23 | Correct | 3 ms | 348 KB | Output is correct |
24 | Incorrect | 1 ms | 348 KB | If people start at 0 and 4, then they can avoid each other |
25 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 344 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 344 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |
11 | Correct | 1 ms | 348 KB | Output is correct |
12 | Correct | 1 ms | 348 KB | Output is correct |
13 | Correct | 2 ms | 348 KB | Output is correct |
14 | Correct | 4 ms | 572 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 0 ms | 348 KB | Output is correct |
18 | Correct | 1 ms | 348 KB | Output is correct |
19 | Correct | 3 ms | 468 KB | Output is correct |
20 | Correct | 3 ms | 604 KB | Output is correct |
21 | Correct | 2 ms | 348 KB | Output is correct |
22 | Correct | 0 ms | 348 KB | Output is correct |
23 | Correct | 0 ms | 348 KB | Output is correct |
24 | Correct | 0 ms | 348 KB | Output is correct |
25 | Correct | 0 ms | 348 KB | Output is correct |
26 | Correct | 0 ms | 348 KB | Output is correct |
27 | Correct | 0 ms | 348 KB | Output is correct |
28 | Correct | 1 ms | 344 KB | Output is correct |
29 | Correct | 1 ms | 348 KB | Output is correct |
30 | Correct | 4 ms | 480 KB | Output is correct |
31 | Correct | 3 ms | 604 KB | Output is correct |
32 | Correct | 3 ms | 348 KB | Output is correct |
33 | Incorrect | 1 ms | 348 KB | If people start at 0 and 4, then they can avoid each other |
34 | Halted | 0 ms | 0 KB | - |