Submission #464567

#TimeUsernameProblemLanguageResultExecution timeMemory
464567pikel_rikAliens (IOI16_aliens)C++17
0 / 100
0 ms204 KiB
#include <bits/stdc++.h> using namespace std; long long take_photos(int n, int m, int k, vector<int> r, vector<int> l) { for (int i = 0; i < n; 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--) { } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...