Submission #405063

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4050632021-05-15 16:28:08ly20Connecting Supertrees (IOI20_supertrees)C++17
Compilation error
0 ms0 KiB
#include "supertrees.h"
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1123;
int comp[MAXN];
vector <int> grafo[MAXN];
int marc[MAXN];
int cmp;
//vector <int> grafo2[MAXN];
void dfs(int v) {
marc[v] = 1;
comp[v] = cmp;
for(int i = 0; i < grafo[v].size(); i++) {
int viz = grafo[v][i];
if(marc[viz] == 1) continue;
dfs(viz);
}
}
int resp[MAXN][MAXN];
int rep[MAXN];
int cic[MAXN][MAXN];
int rep[MAXN];
int cm2[MAXN], cmp2;
int marc2[MAXN];
vector <int> ln[MAXN];
vector <vector <int> > answer;
//vector <int> temp;
void dfs2(int v) {
marc2[v] = 1;
cm2[v] = cmp2;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

supertrees.cpp: In function 'void dfs(int)':
supertrees.cpp:13:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     for(int i = 0; i < grafo[v].size(); i++) {
      |                    ~~^~~~~~~~~~~~~~~~~
supertrees.cpp: At global scope:
supertrees.cpp:22:5: error: redefinition of 'int rep [1123]'
   22 | int rep[MAXN];
      |     ^~~
supertrees.cpp:20:5: note: 'int rep [1123]' previously declared here
   20 | int rep[MAXN];
      |     ^~~
supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:77:30: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   77 |             for(int k = 0; k < ln[i].size(); k++) {
      |                            ~~^~~~~~~~~~~~~~
supertrees.cpp:78:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   78 |                 for(int l = 0; l < ln[j].size(); l++) {
      |                                ~~^~~~~~~~~~~~~~
supertrees.cpp:87:13: error: expected primary-expression before 'else'
   87 |             else return 0;
      |             ^~~~