# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1131213 | JuanJL | Building Skyscrapers (CEOI19_skyscrapers) | C++20 | 0 ms | 328 KiB |
#include <bits/stdc++.h>
#define fst first
#define snd second
#define pb push_back
#define SZ(x) (int)x.size()
#define ALL(x) x.begin(),x.end()
#define forn(i,a,b) for(int i = a; i < b; i++)
using namespace std;
typedef long long ll;
int main(){
ll n,t; cin>>n>>t;
if(t==2){ cout<<"NO\n"; return 0; }
vector<pair<ll,pair<pair<ll,ll>,ll>>> build(n);
forn(i,0,n){
cin>>build[i].snd.fst.fst>>build[i].snd.fst.snd;
build[i].fst=build[i].snd.fst.fst+build[i].snd.fst.snd;
build[i].snd.snd=i;
}
sort(ALL(build));
bool yes = true;
vector<ll> res = {build[0].snd.snd};
pair<ll,ll> pos=build[0].snd.fst;
forn(i,1,n){
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |