Submission
Status:
(-SSSSSSSSSSSS)(-SSSSSSSS)(-SSSSSSSSS)(-SSSSSSSSS)(-SSSSSSSSSSSSS)(-SSSSSSSSSSSSSSSSSS)(-SSSSSSSSSSSSSSSSSSSSS)
Subtask/Task Score:
{0/4}{0/4}{0/5}{0/7}{0/25}{0/34}{0/21}
Score: 0
User: kungarooo
Problemset: ร้านปลอดภาษี (Duty Free)
Language: cpp
Time: 0.232 second
Submitted On: 2025-11-01 16:16:37
#include <bits/stdc++.h>
using namespace std;
// you can write more function here
int minimum_bag_rearrangement_time(vector<int> max_allowed_positions) {
sort(max_allowed_positions.begin(),max_allowed_positions.end());
int cnt=1,sz=max_allowed_positions.size();
for(int i=0;i<sz;i++){
if(max_allowed_positions[i]>=cnt){
cnt++;
}
}
cnt--;
return (sz+cnt-1)/cnt;
}