제출 #119373

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
1193732019-06-21 06:32:47SuperJava로봇 (IOI13_robots)C++17
100 / 100
1618 ms30032 KiB
#include <vector>
#include <utility>
#include <iostream>
#include <tuple>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
typedef long long ll;
using namespace std;
#include "robots.h"
int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) {
vector<pair<int,int>> ok;
for (int i = 0; i < T; ++i){
ok.push_back({S[i],W[i]});
}
sort(X,X+A);
reverse(X,X+A);
sort(Y,Y+B);
reverse(Y,Y+B);
int l = (T+A+B-1)/(A+B),r = T,ans = -1;
vector<pair<int,int>> q;
for (int i = 0; i < T; ++i){
q.push_back(ok[i]);
}
sort(q.begin(), q.end(),[](auto e,auto z){
if(e.first == z.first) return e.second > z.second;
return e.first < z.first;
});
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

컴파일 시 표준 에러 (stderr) 메시지

robots.cpp: In function 'int putaway(int, int, int, int*, int*, int*, int*)':
robots.cpp:51:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     if(done != size(ad)){
        ~~~~~^~~~~~~~~~~
#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...