제출 #367754

#제출 시각아이디문제언어결과실행 시간메모리
367754idk321로봇 (IOI13_robots)C++11
14 / 100
813 ms42860 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<array<int, 2>> toys(t); for (int i = 0; i < t; i++) { toys[i][0] = w[i]; toys[i][1] = s[i]; } int res = 0; multiset<int> sett; for (int i = 0; i < t; i++) sett.insert(w[i]); sort(x, x + a); if (*sett.rbegin() >= x[a - 1]) return -1; while (!sett.empty()) { for (int i = 0; i < a; i++) { auto it = sett.lower_bound(x[i]); if (it == sett.begin()) continue; it--; sett.erase(it); } res++; } return res; }
#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...