Submission #47562

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
475622018-05-05 03:49:00fallingstarSchools (IZhO13_school)C++17
100 / 100
459 ms13164 KiB
/**
Problem: Schools
Source: IX Zhautykov Olympiad on Mathematics, Physics and Informatics (IZhO) 2013, day 1, problem C
*/
#include <iostream>
#include <algorithm>
#include <set>
#define long long long
using namespace std;
const int N = 3e5 + 2;
int n, m1, m2;
pair<int, int> a[N];
long fa[N], fb[N];
int main()
{
cin >> n >> m1 >> m2;
for (int i = 1; i <= n; ++i)
cin >> a[i].first >> a[i].second;
sort(a + 1, a + 1 + n, [](pair<int, int> a, pair<int, int> b) {
return a.first - a.second > b.first - b.second;
});
set<pair<int, int> > s;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

school.cpp: In function 'int main()':
school.cpp:35:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (s.size() > m1)
             ~~~~~~~~~^~~~
school.cpp:46:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (s.size() > m2)
             ~~~~~~~~~^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...