Pagini recente » Cod sursa (job #1722606) | Cod sursa (job #9930) | Cod sursa (job #2080029) | Cod sursa (job #2653568) | Cod sursa (job #538974)
Cod sursa(job #538974)
#include <algorithm>
#include <fstream>
#include <vector>
using namespace std;
struct band
{
int x, y;
bool operator<(const band &b)
{
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");
}