Cod sursa(job #538975)
| Utilizator | Data | 22 februarie 2011 10:09:18 | |
|---|---|---|---|
| Problema | Heavy metal | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.43 kb |
#include <algorithm>
#include <fstream>
#include <vector>
using namespace std;
struct band
{
int x, y;
bool operator<(const band &b) const
{
return (y < b.y);
}
};
int main()
{
ifstream in("heavymetal.in");
int N;
in >> N;
vector<band> b;
for (int i = 1; i <= N; i++)
{
band x;
in >> x.x >> x.y;
b.push_back(x);
}
sort(b.begin(), b.end());
ofstream out("heavymetal.out");
}
