# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
80942 | wzy | Robots (IOI13_robots) | C++11 | 2716 ms | 36572 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;
#define pii pair<int,int>
#define pb push_back
#define F first
#define S second
// think about the toys as points (W[i] , S[i]) , robots as lines :
// robot A type is a vertical line in X[i]
// robot B type is a horizontal line in Y[i]
// let R[i] be the leftmost type A robot that dominate
vector<int> hold[2][50005];
bool used[1000005];
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
vector<int> vert, hori;
for(int i = 0 ; i < A ; i++){
vert.push_back(X[i]);
}
for(int i = 0 ; i < B; i++){
hori.push_back(Y[i]);
}
sort(vert.begin() , vert.end());
sort(hori.begin() , hori.end());
for(int i = 0 ; i < T ; i++){
int l = 0 , r = vert.size();
r--;
int ansj = -1;
while(l<=r){
int mid = (l+r)/2;
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... |