Submission #422699

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4226992021-06-10 10:42:29oleh1421Split the Attractions (IOI19_split)C++17
Compilation error
0 ms0 KiB
#include "grader.cpp"
#include "split.h"
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int N=200010;
vector<int>g[N];
pair<int,int>gr[3];
int sz[N];
int P[N];
void dfs(int v,int pr){
sz[v]=1;
P[v]=pr;
for (int to:g[v]){
if (to!=pr){
dfs(to,v);
sz[v]+=sz[to];
}
}
}
int ans[N];
void Mark(int v,int ind){
if (!gr[ind].first) return;
gr[ind].first--;
ans[v]=gr[ind].second;
// if (!ind) cout<<"OK "<<v<<" "<<gr[ind].first<<" "<<gr[ind].second<<endl;
for (int to:g[v]){
if (ans[to]) continue;
Mark(to,ind);
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

split.cpp: In function 'std::vector<int> find_split(int, int, int, int, std::vector<int>, std::vector<int>)':
split.cpp:69:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   69 |  for (int i=0;i<p.size();i++){
      |               ~^~~~~~~~~
split.cpp:73:14: warning: comparison of integer expressions of different signedness: 'std::vector<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
   73 |  if (p.size()==n-1){
      |      ~~~~~~~~^~~~~
/usr/bin/ld: /tmp/ccZ5I1ve.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccR4x2rf.o:split.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status