제출 #132697

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
1326972019-07-19 11:07:40VardanyanHotel (CEOI11_hot)C++14
100 / 100
1644 ms81176 KiB
#include <bits/stdc++.h>
using namespace std;
const int N = 500*1000+5;
long long c[N],p[N];
long long v[N],d[N];
bool cmp(pair<long long, long long> a, pair<long long,long> b){
if(a.first>b.first) return a.first>b.first;
if(a.first<b.first) return a.first>b.first;
return a.second<b.second;
}
int main(){
ios_base::sync_with_stdio(false);
int n,m,k;
cin>>n>>m>>k;
multiset<pair<long long,long long> > ms;
for(int i = 1;i<=n;i++){
cin>>c[i]>>p[i];
ms.insert({p[i],c[i]});
}
vector<pair<long long,long long> > all;
for(int i = 1;i<=m;i++){
cin>>v[i]>>d[i];
all.push_back({v[i],d[i]});
}
sort(all.begin(),all.end(),cmp);
int qn = k;
long long ans = 0;
vector<long long > pr;
for(int i = 0;i<all.size();i++){
if(!qn) break;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

hot.cpp: In function 'int main()':
hot.cpp:29:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0;i<all.size();i++){
                   ~^~~~~~~~~~~
hot.cpp:45:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i = 0;i<pr.size();i++){
                   ~^~~~~~~~~~
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...