Submission #484627

# Submission time Handle Problem Language Result Execution time Memory
484627 2021-11-04T20:57:33 Z Victor Pipes (CEOI15_pipes) C++17
0 / 100
780 ms 62200 KB
#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 = (b - 1); i >= (a); --i)
#define trav(a, x) for (auto &a : x)

#define all(x) x.begin(), x.end()
#define sz(x) x.size()
#define pb push_back
#define debug(x) cout << #x << " = " << x << endl

#define umap unordered_map
#define uset unordered_set

typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<vi> vvi;

typedef long long ll;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef vector<pll> vpll;

const int INF = 1'000'000'007;

set<ii> ans;

struct union_find {
    int p[100001];
    short rank[100001];
    union_find(int n) {
        rep(i, 0, n) p[i] = i;
        memset(rank, 0, sizeof(rank));
    }

    int find_set(int i) { return p[i] == i ? i : find_set(p[i]); }
    void union_set(int i, int j) {
        i = find_set(i);
        j = find_set(j);
        if (i == j) return;

        if (rank[i] < rank[j]) swap(i, j);
        if (rank[i] == rank[j]) ++rank[i];
        p[j] = i;
    }
};

bitset<17> edges[6000000];

int main() {
    cin.tie(0)->sync_with_stdio(0);
    cin.exceptions(cin.failbit);

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

    rep(i, 0, m) {
        int u, v;
        cin >> u >> v;
        --u;
        --v;
    }

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 204 KB Wrong number of edges
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 332 KB Wrong number of edges
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 72 ms 5672 KB Output is correct
2 Incorrect 75 ms 5532 KB Wrong number of edges
# Verdict Execution time Memory Grader output
1 Correct 118 ms 5800 KB Output is correct
2 Incorrect 167 ms 11588 KB Wrong number of edges
# Verdict Execution time Memory Grader output
1 Correct 208 ms 5688 KB Output is correct
2 Incorrect 173 ms 14132 KB Wrong number of edges
# Verdict Execution time Memory Grader output
1 Correct 227 ms 460 KB Output is correct
2 Runtime error 211 ms 18328 KB Memory limit exceeded
# Verdict Execution time Memory Grader output
1 Correct 358 ms 716 KB Output is correct
2 Runtime error 381 ms 33568 KB Memory limit exceeded
# Verdict Execution time Memory Grader output
1 Runtime error 488 ms 18024 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 625 ms 30532 KB Memory limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 780 ms 62200 KB Memory limit exceeded
2 Halted 0 ms 0 KB -