Submission #1296673

#TimeUsernameProblemLanguageResultExecution timeMemory
1296673kawhietMake them Meet (EGOI24_makethemmeet)C++20
10 / 100
1 ms348 KiB
#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...) 42
#endif

const int N = 105;

vector<int> g[N];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    int n, m;
    cin >> n >> m;

    for (int i = 0; i < m; i++) {
        int u, v;
        cin >> u >> v;
        g[u].push_back(v);
        g[v].push_back(u);
    }

    vector<int> v(n, 1);
    cout << 3 << '\n';
    for (auto x : v) cout << x << ' '; cout << '\n';
    v[0] = v[1] = 2;
    for (auto x : v) cout << x << ' '; cout << '\n';
    v.assign(n, 1);
    for (auto x : v) cout << x << ' '; cout << '\n';

    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...