# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
226303 | kshitij_sodani | Meetings (JOI19_meetings) | C++17 | 33 ms | 32612 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 vis[n][n];
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
vis[i][j]=0;
}
}
int arr[n];
for(int i=0;i<n;i++){
arr[i]=i;
}
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
int st=1;
shuffle(arr, arr + n,
default_random_engine(0));
for(int kk=0;kk<n;kk++){
int k=arr[k];
if(k==i or k==j){
continue;
}
int x=Query(i,j,k);
if(x==k){
st=0;
break;
}
}
vis[i][j]=st;
}
}
for(int i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(vis[i][j]==1){
Bridge(i,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... |