Submission #130588

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
1305882019-07-15 15:53:13abacabaFactories (JOI14_factories)C++14
Compilation error
0 ms0 KiB
#include "factories.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define int long long
const int inf = 2e15;
const int MAX_N = 5e5 + 15;
const int MAX_Q = 1e6 + 15;
const int MAX_SUM_ST = 1e6 + 15;
const int MAX_VALUE = 1e9;
int n, m, sz[MAX_N], minn[MAX_N];
vector <int> g[MAX_N], d[MAX_N], pCentroid[MAX_N], dCentroid[MAX_N];
vector <int> is;
bool deleted[MAX_N];
void build(int v, int p = -1) {
sz[v] = 1;
for(auto to : g[v])
if(to != p && !deleted[to]) {
build(to, v);
sz[v] += sz[to];
}
}
int centroid(int v, int p, int n) {
for(auto to : g[v])
if(!deleted[to] && to != p && sz[to] > n / 2)
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

factories.cpp: In function 'void dfs(long long int, long long int, long long int, long long int)':
factories.cpp:38:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i = 0; i < g[v].size(); ++i) {
                 ~~^~~~~~~~~~~~~
factories.cpp: In function 'long long int Query(long long int, long long int*, long long int, long long int*)':
factories.cpp:70:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j < pCentroid[Y[i]].size(); ++j)
                  ~~^~~~~~~~~~~~~~~~~~~~~~~~
factories.cpp:74:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j < pCentroid[X[i]].size(); ++j)
                  ~~^~~~~~~~~~~~~~~~~~~~~~~~
factories.cpp:78:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j < pCentroid[X[i]].size(); ++j) {
                  ~~^~~~~~~~~~~~~~~~~~~~~~~~
factories.cpp:84:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for(int j = 0; j < pCentroid[Y[i]].size(); ++j) {
                  ~~^~~~~~~~~~~~~~~~~~~~~~~~
/tmp/cc3PnCM0.o: In function `main':
grader.cpp:(.text.startup+0x36d): undefined reference to `Init(int, int*, int*, int*)'
grader.cpp:(.text.startup+0x3ed): undefined reference to `Query(int, int*, int, int*)'
collect2: error: ld returned 1 exit status