Submission
Status:
(PP-SSSSSSSSSS)(-SSSSSSSS)(PP-SSSSSSS)(-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.121 second
Submitted On: 2025-11-01 16:23:44
#include <bits/stdc++.h>
using namespace std;
// you can write more function here
int minimum_bag_rearrangement_time(vector<int> max_allowed_positions) {
int cnt=1,sz=max_allowed_positions.size(),ans=0;
for(int i=0;i<sz;i++){
if(max_allowed_positions[i]>=cnt){
cnt++;
}else{
cnt=1;
ans++;
}
}
return ans;
}