# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
126548 | HungAnhGoldIBO2020 | Coin Collecting (JOI19_ho_t4) | C++14 | 2 ms | 376 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |