Submission #835842

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8358422023-08-23 21:09:02JuanJakarta Skyscrapers (APIO15_skyscraper)C++17
100 / 100
740 ms78396 KiB
#include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize (03)
#define int long long
#define pb push_back
#define tii tuple<int,int,int>
#define pii pair<int,int>
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
const int maxn = 3e4 + 5, INF = 0x3f3f3f3f;
vector<int> doges[maxn];
int dist[maxn][300];
priority_queue<tii, vector<tii>, greater<tii>> pq;
int32_t main(){
ios::sync_with_stdio(false); cin.tie(0);
int n, m; cin >> n >> m;
pii doge0, doge1; cin >> doge0.ff >> doge0.ss >> doge1.ff >> doge1.ss;
doges[doge0.ff].pb(doge0.ss);
doges[doge1.ff].pb(doge1.ss);
for(int i = 2; i < m; i++){
int bi, pi; cin >> bi >> pi;
doges[bi].pb(pi);
}
for(int i = 0; i < n; i++){
sort(all(doges[i]));
doges[i].erase(unique(all(doges[i])), doges[i].end());
// cout << doges[i].size() << endl;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...