Submission #463956

#TimeUsernameProblemLanguageResultExecution timeMemory
463956dxz05Robots (IOI13_robots)C++14
0 / 100
1 ms204 KiB
#include "robots.h"
#include <bits/stdc++.h>

using namespace std;

int putaway(int A, int B, int N, int X[], int Y[], int W[], int S[]) {
    sort(X, X + A);
    sort(Y, Y + B);

    int ans = 0;
    int j = 0;
    for (int i = 0; i < N; i++){
        if (j == 0) ans++;

        j = lower_bound(X + j, X + A, W[i]) - X;
        j = (j + 1) % A;
    }

    return ans;
}
#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...