Submission #226328

#TimeUsernameProblemLanguageResultExecution timeMemory
226328kshitij_sodaniMeetings (JOI19_meetings)C++17
Compilation error
0 ms0 KiB
#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;
	}*/
	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++){
			int st=1;
			for(int kk=0;kk<n;kk++){
				int k=kk;
				if(k==i or k==j){
					continue;
				}
				int x=Query(i,j,k);
				vis[i][j]=x;
				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()){
		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)

meetings.cpp: In function 'void Solve(int)':
meetings.cpp:30:8: warning: unused variable 'st' [-Wunused-variable]
    int st=1;
        ^~
meetings.cpp:58:3: error: 'x' was not declared in this scope
   x=ac.front();
   ^