Submission #1031264

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10312642024-07-22 16:33:28Marco_EscandonSplit the Attractions (IOI19_split)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;
typedef int ll;
#define x first
#define y second
vector<ll> cad[100005];
vector<ll> sts,sol;
ll aux=0;pair<ll,ll> st={1e9,1e9};
ll dfs(ll node){
if(sts[node]!=0) return 0;
sts[node]=1;
for(auto i:cad[node])
sts[node]+=dfs(i);
if(sts[node]>=aux)
st=min(st,{sts[node],node});
return sts[node];
}
void fillst(ll node, ll c, ll cnt)
{
sol[node]=c;cnt--;
queue<ll>q;q.push(node);
while(!q.empty())
{
for(auto i:cad[q.front()])
{
if(sts[i]<sts[q.front()]&&sol[i]==0&&cnt>0)
{
sol[i]=c;
cnt--;
q.push(i);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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:57:16: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   57 |  for(int i=0; i<p.size(); i++)
      |               ~^~~~~~~~~
/usr/bin/ld: /tmp/ccJwqy0I.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccT7xitK.o:split.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status