Submission #1123888

#TimeUsernameProblemLanguageResultExecution timeMemory
1123888AvianshTowers (NOI22_towers)C++20
0 / 100
1 ms320 KiB
#include <bits/stdc++.h> using namespace std; int mxco = 1e2+5; signed main(){ ios::sync_with_stdio(0); cin.tie(0); int n; cin >> n; vector<pair<int,int>>ypex[mxco]; for(int i = 0;i<n;i++){ int x,y; cin >> x >> y; ypex[y].push_back({x,i}); } for(int i = 0;i<mxco;i++){ sort(ypex[i].begin(),ypex[i].end()); } bool ans[n]; fill(ans,ans+n,0); for(int i = 0;i<mxco;i++){ if(ypex[i].size()){ ans[ypex[i].front().second]=1; ans[ypex[i].back().second]=1; } } for(int i = 0;i<n;i++){ cout << ans[i]; } return 0; }
#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...