# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
226329 | kshitij_sodani | Meetings (JOI19_meetings) | C++17 | 3089 ms | 1392 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <bits/stdc++.h>
using namespace std;
typedef int64_t llo;
#define mp make_pair
#define pb push_back
#define a first
#define b second
#define endl "\n"
#include "meetings.h"
void Solve(int n){
/*int arr[n];
for(int i=0;i<n;i++){
arr[i]=i;
}*/
int co[n];
for(int i=0;i<n;i++){
co[i]=0;
}
vector<int> dd[n];
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
for(int kk=0;kk<n;kk++){
int k=kk;
if(k==i or k==j){
continue;
}
int x=Query(i,j,k);
if(i!=x){
co[i]+=1;
dd[i].pb(i);
}
if(j!=x){
co[j]+=1;
dd[x].pb(j);
}
break;
}
}
}
queue<int> ac;
for(int i=0;i<n;i++){
if(co[i]==0){
ac.push(i);
}
}
int par[n];
while(ac.size()){
int x=ac.front();
for(auto j:dd[x]){
co[j]-=1;
if(co[j]==0){
par[j]=x;
ac.push(j);
}
}
}
}
/*int main(){
return 0;
}*/
Compilation message (stderr)
# | 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... |