Submission #88002

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
880022018-12-03 11:08:23PajarajaRobots (IOI13_robots)C++17
100 / 100
1919 ms24744 KiB
#include "robots.h"
#include <bits/stdc++.h>
using namespace std;
int a,b,t,x[50020],y[50020],nxt[50020],prv[50020],cnt[50020];
bool frsee[50020];
struct igracka{int w,s;};
bool cmp (igracka a,igracka b) {return a.w>b.w;}
igracka r[1000000];
int binary(int l,int d,int val)
{
if(l==d) return l;
int s=(l+d)/2;
if(y[s]>val) return binary(l,s,val);
return binary(s+1,d,val);
}
int root(int u)
{
while(nxt[u]!=u)
{
nxt[u]=nxt[nxt[u]];
u=nxt[u];
}
return u;
}
void connect(int u,int v){nxt[root(u)]=root(v);}
bool provera(int k)
{
fill(cnt+1,cnt+b+2,k);
int p=0;
long long d=0;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...