Submission #201626

#TimeUsernameProblemLanguageResultExecution timeMemory
201626mohammadRobots (IOI13_robots)C++14
0 / 100
5 ms380 KiB
/* ░░░░██████████████████ ░░▄███████▀▀▀▀▀▀███████▄ ░▐████▀▒mohammad▒▀██████▄ ░███▀▒▒▒▒alaa▒▒▒▒▒▒▀█████ ░▐██▒▒▒alwrawrah▒▒▒▒▒████▌ ░▐█▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▌ ░░█▒▄▀▀▀▀▀▄▒▒▄▀▀▀▀▀▄▒▐███▌ ░░░▐░░░▄▄░░▌▐░░░▄▄░░▌▐███▌ ░▄▀▌░░░▀▀░░▌▐░░░▀▀░░▌▒▀▒█▌ ░▌▒▀▄░░░░▄▀▒▒▀▄░░░▄▀▒▒▄▀▒▌ ░▀▄▐▒▀▀▀▀▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒█ ░░░▀▌▒▄██▄▄▄▄████▄▒▒▒▒█▀ ░░░░▄██████████████▒▒▐▌ ░░░▀███▀▀████▀█████▀▒▌ ░░░░░▌▒▒▒▄▒▒▒▄▒▒▒▒▒▒▐ ░░░░░▌▒▒▒▒▀▀▀▒▒▒▒▒▒▒▐ */ #include<bits/stdc++.h> #include "robots.h" using namespace std; typedef long long ll ; const ll oo = 1e13 ; const double PI = acos(-1) ; const ll M = 1e9 + 7 ; vector<int> v; int ans =0 ; int putaway(int A, int B, int T, int X[], int Y[], int W[], int S[]) { sort(X , X + A) ; sort(W , W + T) ; if(X[A - 1] < W[T - 1])return -1; else{ for(int i = 0 ; i < A ; ++i){ if(X[i] < W[0])continue; auto it = (upper_bound(W , W + T , X[i]) - W); if(v.size()) v.push_back(it - v.back()); else v.push_back(it); } ans = v.back() ; int x = 1 ; for(int i = v.size() - 2 ; i >= 0 ; --i){ if(v[i] > ans) ans = max(ans , (v[i] - ans + x) / (x + 1) + ans); x++; } } return ans; }
#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...