Submission #1036867

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10368672024-07-27 18:11:14clementineRobots (IOI13_robots)C++17
100 / 100
1295 ms24852 KiB
#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 ++;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...