Submission #126548

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1265482019-07-08 04:25:11HungAnhGoldIBO2020Coin Collecting (JOI19_ho_t4)C++14
0 / 100
2 ms376 KiB
#include<iostream>
#include<algorithm>
#include<vector>
#include<math.h>
#define int long long
using namespace std;
const int N=2e5+2;
pair<int,int> coor[N];
vector<int> lis,lis1;
bool used[N],wow[N>>1][2];
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
int n,i,j;
long long ans=0;
cin>>n;
for(i=1;i<=2*n;i++){
cin>>coor[i].first>>coor[i].second;
}
sort(coor+1,coor+1+2*n);
j=1;
bool cac,cac1;
for(i=1;i<=n;i++){
while(j<=2*n&&coor[j].first<=i){
if(coor[j].second>=2){
lis1.push_back(j);
}
else{
lis.push_back(j);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...