Cod sursa(job #538974)

Utilizator iconiKMircea Chirea iconiK Data 22 februarie 2011 10:07:55
Problema Heavy metal Scor 0
Compilator cpp Status done
Runda Arhiva de probleme Marime 0.42 kb
#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");
}