Submission #464565

#TimeUsernameProblemLanguageResultExecution timeMemory
464565pikel_rikAliens (IOI16_aliens)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);

	int n, m, k;
	cin >> n >> m >> k;

	vector<int> r(n), l(n);
	for (int i = 0; i < n; i++) {
		cin >> r[i] >> l[i];
		if (r[i] < l[i]) {
			swap(r[i], l[i]);
		}
	}

	vector<int> ind(n);
	iota(ind.begin(), ind.end(), 0);
	sort(ind.begin(), ind.end(), [&](int i, int j) {
		return l[i] < l[j] || (l[i] == l[j] && r[i] > r[j]);
	});

	int mx = INT_MIN;
	ind.erase(remove_if(ind.begin(), ind.end(), [&](int i) {
		if (r[i] <= mx) {
			return true;
		} else {
			mx = r[i];
			return false;
		}
	}), ind.end());

	int sz = (int) ind.size();
	sort(ind.begin(), ind.end(), [&](int i, int j) {
		return r[i] < r[j];
	});

	for (int i = sz - 1; i >= 0; i--) {
		
	}
	
	cout << 0 << '\n';
	return 0;
}

Compilation message (stderr)

/usr/bin/ld: /tmp/cc1GiwUL.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccx4qEvN.o:aliens.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/cc1GiwUL.o: in function `main':
grader.cpp:(.text.startup+0xf0): undefined reference to `take_photos(int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status