Submission #226318

#TimeUsernameProblemLanguageResultExecution timeMemory
226318kshitij_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; }*/ 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 kk; if(k==i or k==j){ continue; } int x=Query(i,j,k); if(x!=i and x!=j){ 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)

meetings.cpp: In function 'void Solve(int)':
meetings.cpp:29:9: error: redeclaration of 'int kk'
     int kk;
         ^~
meetings.cpp:28:12: note: 'int kk' previously declared here
    for(int kk=0;kk<n;kk++){
            ^~
meetings.cpp:30:8: error: 'k' was not declared in this scope
     if(k==i or k==j){
        ^
meetings.cpp:30:8: note: suggested alternative: 'kk'
     if(k==i or k==j){
        ^
        kk
meetings.cpp:33:21: error: 'k' was not declared in this scope
     int x=Query(i,j,k);
                     ^
meetings.cpp:33:11: error: 'Query' was not declared in this scope
     int x=Query(i,j,k);
           ^~~~~
meetings.cpp:29:9: warning: unused variable 'kk' [-Wunused-variable]
     int kk;
         ^~
meetings.cpp:45:5: error: 'Bridge' was not declared in this scope
     Bridge(i,j);
     ^~~~~~
meetings.cpp:45:5: note: suggested alternative: 'fwide'
     Bridge(i,j);
     ^~~~~~
     fwide