# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1036867 | clementine | Robots (IOI13_robots) | C++17 | 1295 ms | 24852 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "robots.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[])
{
vector<int> a(X, X+A), b(Y, Y+B);
vector<pair<int, int>> t(T);
for(int i = 0; i <T; i ++) { t[i] = {W[i], S[i]};}
sort(a.begin(), a.end());
sort(b.begin(), b.end());
sort(t.begin(), t.end());
int l = 1;
int r = T+1;
while(l <r)
{
int mid = (l + r)/2;
//cout << l << " " << r << " " << '\n';
priority_queue<int> taken;
int toyid = 0;
for(int aid = 0; aid <A; aid ++)
{
while(t[toyid].first < a[aid] && toyid < T)
{
taken.push(t[toyid].second);
toyid ++;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |