Submission #921507

#TimeUsernameProblemLanguageResultExecution timeMemory
9215071075508020060209tcMeetings (JOI19_meetings)C++14
17 / 100
1252 ms628 KiB
#pragma GCC optimize("O3") #include "meetings.h" #include<bits/stdc++.h> using namespace std; //#define int long long #define X first #define Y second #define SZ(x) (int)(x).size() map<vector<int>,int>mp; int n; pair<int,int>slv(int st,int en){ int ret=en; for(int i=1;i<=n;i++){ if(i==st||i==ret){continue;} int v=Query(st-1,i-1,ret-1); v++; if(v==st||v==ret){continue;} ret=v; } return {min(st,ret)-1,max(st,ret)-1}; } void Solve(int N){ set<pair<int,int>>ans; n=N; for(int i=1;i<=n;i++){ for(int j=i+1;j<=n;j++){ ans.insert(slv(i,j)); } } for(auto it=ans.begin();it!=ans.end();it++){ Bridge((*it).first, (*it).second ); } } /* signed main(){ } */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...