Pagini recente » Cod sursa (job #4221) | Cod sursa (job #1367757) | Cod sursa (job #1799402) | Cod sursa (job #200282) | Cod sursa (job #2938544)
#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;
}