Submission #222911

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2229112020-04-14 10:41:59laoriuRobots (IOI13_robots)C++14
100 / 100
503 ms26212 KiB
#include <bits/stdc++.h>
#include "robots.h"
using namespace std;
typedef pair <int,int> pp;
pp A[1000002];
int pos[1000002],nextt[100002],C[100002];
int dsu[100002],val[100002];
int root(int u)
{
int v=u;
while (dsu[u]>=0) u=dsu[u];
while (dsu[v]>=0)
{
int p=dsu[v];
dsu[v]=u;
v=p;
}
return u;
}
int unionn(int u,int v)
{
if (dsu[u]>dsu[v]) swap(u,v);
dsu[u]+=dsu[v];dsu[v]=u;
val[u]=max(val[u],val[v]);
}
int check(int a,int b,int n,int X[],int Y[],int k)
{
for (int i=0;i<=b;i++)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

robots.cpp: In function 'int unionn(int, int)':
robots.cpp:26:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
robots.cpp: In function 'int check(int, int, int, int*, int*, int)':
robots.cpp:57:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i=0;i<P.size();i+=k)
                  ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...