Submission #1208674

#TimeUsernameProblemLanguageResultExecution timeMemory
1208674peraRobots (IOI13_robots)C++20
Compilation error
0 ms0 KiB
#include<bits/stdc++.h>
using namespace std;

int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
   sort(X , X + A);
   vector<int> a(T) , c(A);
   for(int i = 0;i < T;i ++){
      a[i] = -1;
      for(int bit = 21;bit >= 0;bit--){
         a[i] += 1 << bit;
         if(a[i] >= A){
            a[i] -= 1 << bit;
         }else if(X[a[i]] > W[i]){
            a[i] -= 1 << bit;
         }
      }
      ++a[i];
      if(a[i] == A){
         return -1;
      }
      c[A - a[i] - 1]++;
   }
   int ans = 0;
   for(int i = 1;i < A;i ++){
      c[i] += c[i - 1];
   }
   for(int i = 0;i < A;i ++){
      ans = max(ans , (c[i] + i) / (i + 1));
   }
   return ans;
}

Compilation message (stderr)

/usr/bin/ld: /tmp/cc3NuCUg.o: in function `main':
grader.c:(.text.startup+0x1a1): undefined reference to `putaway'
collect2: error: ld returned 1 exit status