# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
993411 | lacito | Robots (IOI13_robots) | C++14 | 1 ms | 348 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 <bits/stdc++.h>
#include "robots.h"
using namespace std;
// #define int long long
#define endl '\n'
#define F first
#define SS second
#define pb push_back
#define all(a) a.begin(),a.end()
const int NN=1e6+50000;
const int MOD=1e9+7;
const int off=(1<<11);
int putaway(int A,int B,int T,int X[],int Y[],int W[],int S[]){
int l=0,r=T;
int ans=-1;
while(l+1<r){
vector<pair<int,pair<int,int>>>vec;
int md=(l+r)/2;
for(int i=0;i<T;i++)vec.pb({W[i],{1,i}});
for(int i=0;i<A;i++)vec.pb({X[i],{0,i}});
priority_queue<pair<int,int>> pq;
sort(all(vec));
for(int i=0;i<vec.size();i++){
if(vec[i].SS.F==1){
pq.push({S[vec[i].SS.SS],1});
}
Compilation message (stderr)
# | 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... |