Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include <cstdio>using namespace std;int d[100005],n;int get_score(int T){int score = 0;int rest = 0;for(int i=0; i<n; i++){rest += T;if(rest <= d[i]){rest = 0;}else{rest -= d[i];++score;}}return score;}static int binSearch(int lo, int hi){while(lo<hi){