Submission #84463

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
844632018-11-15 09:13:14farukkastamonudaSchools (IZhO13_school)C++14
100 / 100
393 ms31472 KiB
#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define lo long long
#define inf 1000000000
#define md 1000000007
#define pb push_back
#define li 300005
#define ii pair<lo int,lo int>
using namespace std;
lo int n,m,ss,cev;
pair<lo int,lo int> A[li];
priority_queue<lo int> q;
multiset< pair<lo int,lo int> > s,t;
int main(){
scanf("%lld %lld %lld",&n,&m,&ss);
for(int i=1;i<=n;i++){
scanf("%lld %lld",&A[i].fi,&A[i].se);
}
sort(A+1,A+n+1);
reverse(A+1,A+n+1);
for(int i=1;i<=m;i++){
cev+=A[i].fi;
q.push(A[i].se-A[i].fi);
}
for(int i=m+1;i<=n;i++){
s.insert(mp(A[i].fi,A[i].se));
t.insert(mp(A[i].se,A[i].fi));
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

school.cpp: In function 'int main()':
school.cpp:17:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%lld %lld %lld",&n,&m,&ss);
  ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
school.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   scanf("%lld %lld",&A[i].fi,&A[i].se);
   ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...