Cod sursă (job #357163)

Utilizator avatar LittleWho Mihail Feraru LittleWho IP ascuns
Problemă Zapada (clasele 11 și 12) Compilator cpp | 0,85 kb
Rundă Arhiva de probleme Status evaluat
Dată 27 feb. 2018 12:57:06 Scor 0
#include <bits/stdc++.h>

using namespace std;

#define nmax 10001
#define mmax 100001

int n, m, k;
struct edge {
    int from, to, cost;

    bool operator<(const edge& rhs) const {
        return cost < rhs.cost;
    }
};

edge edges[mmax];

int roots[nmax];
int last;

inline int apm() {
    int cost = 0;


    return cost;
}

int main() {
    freopen("carici.in", "r", stdin);

    //freopen("hex.in", "r", stdin);
    //freopen("hex.out", "w", stdout);

    scanf("%d%d%d", &n, &m, &k);

    int x, y, c;
    for (int i = 0; i < m; i++) {
        scanf("%d%d%d", &x, &y, &c);
        edges[i] = {x, y, c};
    }

    sort(edges, edges + m);
    last = m;
    cout << apm() << "\n";

    for (int i = 0; i < k; i++) {
        scanf("%d%d%d", &x, &y, &c);
        edges[last + i] = {x, y, c};
    }

    return 0;
}