Submission #574821

#TimeUsernameProblemLanguageResultExecution timeMemory
574821AJ00Connecting Supertrees (IOI20_supertrees)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int n; const int MOD = 1000000007; const int INF = 1e18; int construct (vector<vector<int>> p){ int n = p.size(); vector<vector<int>> b(n,vector<int>(n,0)); if (n == 1){ build(b); return 1; } for (int i = 0; i < n; i++){ if (!i){ b[i][1] = 1; } if (i == n-1){ b[i][n-2] = 1; } else { b[i][i-1] = 1; b[i][i+1] = 1; } } build(b); return 1; }

Compilation message (stderr)

supertrees.cpp:7:17: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
    7 | const int INF = 1e18;
      |                 ^~~~
supertrees.cpp: In function 'int construct(std::vector<std::vector<int> >)':
supertrees.cpp:13:9: error: 'build' was not declared in this scope
   13 |         build(b);
      |         ^~~~~
supertrees.cpp:28:5: error: 'build' was not declared in this scope
   28 |     build(b);
      |     ^~~~~