| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1360780 | ezzzay | Swords (NOI23_swords) | C++20 | 49 ms | 1536 KiB |
#include<bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define pb push_back
signed main(){
int n;
cin>>n;
int mx=0;
vector<pair<int,int>>vc;
for(int i=1;i<=n;i++){
int a,b;
cin>>b>>a;
vc.pb({a,b});
}
sort(vc.begin(),vc.end());
int cnt=n;
while(vc.size()){
if(vc.back().ss <=mx)cnt--;
mx=max(mx,vc.back().ss);
vc.pop_back();
}
cout<<cnt;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
