Cod sursa(job #2938544)

Utilizator iProgramInCppCluci Andrei iProgramInCpp Data 12 noiembrie 2022 10:58:33
Problema Cast Scor 0
Compilator cpp-64 Status done
Runda Arhiva de probleme Marime 0.88 kb
#include <bits/stdc++.h>
using namespace std;
ifstream fin ("cast.in");
ofstream fout("cast.out");

struct muchie {
    int x, y, cost;
    muchie(int _x, int _y, int _cost) : x(_x), y(_y), cost(_cost) {}
    bool operator < (const muchie& b) const {
        if (cost == b.cost) {
            if (x == b.x)
                return y < b.y;
            return x < b.x;
        }
        return cost < b.cost;
    }
};
vector<muchie> muchii;
int n,t[15];


int testCase()
{
    muchii.clear();
    fin >> n;

    for (int i=1; i<=n; i++) {
        for (int j=1; j<=n; j++) {
            int cost;
            fin >> cost;
            if (i == j) continue;
            muchii.push_back(muchie(i,j,cost));
        }
    }


    cout<<endl<<endl;

    return S;
}

int main()
{
    int nc;
    fin >> nc;
    while (nc--)
        fout << testCase() << endl;
}