제출 #31156

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
311562017-08-12 03:19:16pasa3232로봇 (IOI13_robots)C++14
100 / 100
2526 ms26900 KiB
#include <bits/stdc++.h>
#include "robots.h"
using namespace std;
typedef pair<int, int> pp;
struct C{
int x, y;
bool operator<(const C &r)const{
return r.x>x;
}
}data[1000010];
int a, b, n, A[50010], B[50010];
priority_queue<pp> q;
priority_queue<pp, vector<pp>, greater<pp> > q1;
int putaway (int A1, int B1, int T, int X[], int Y[], int W[], int S[]){
// freopen("input.txt", "r", stdin);
a=A1, b=B1, n=T;
for(int i=0; i<a; i++) A[i]=X[i];
for(int i=0; i<b; i++) B[i]=Y[i];
for(int i=0; i<n; i++) data[i].x=W[i], data[i].y=S[i];
sort(data, data+n);
sort(A, A+a);
sort(B, B+b);
int s=0, e=n+1;
while(s!=e){
int t=(s+e)/2, inx=0;
for(int i=0; i<a; i++){
while(inx<n&&data[inx].x<A[i]) q.push(make_pair(data[inx].y, data[inx].x)), inx++;
for(int j=0; j<t; j++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...