#include #include #include #include #include using namespace std; const int Max_monster = 1500; const int Max_lv = 50000; const int Max_ans = 100; int save[Max_monster]; int my[Max_ans][Max_lv] = {0}; //lv1 → 位置0 int com[Max_monster]; int main(){ int n; int in; int ans = 999; int ansmax; cin >> n; for(int i=0; i> save[i]; } for(int i=0; i> com[i]; } //計算部分 for(int starti=0; starti= Max_ans){ lvnow ++; //注意 ansnow = 0; } } //LVUP my[ansnow][lvnow] --; my[ansnow + 1][lvnow + com[i]/2] ++; if(ansnow + 1 > ansmax){ ansmax = ansnow + 1; } //cout << "戦闘" << ansnow << "→" << ansnow+1 << "\tLV" << lvnow << "→" << lvnow + com[i]/2 << endl; //next i ++; if(i >= n){ i=0; } }while(i != starti); //答え更新 if(ansmax < ans){ ans = ansmax; } } cout << ans << endl; return 0; }