SRM414 Div1Easy Embassy

解法
開始時間の全探索なのだけれど問題文読めなくて自力で出来なかった。

class Embassy {
public:
  int visaApplication(vector <int> forms, int dayLength, int openTime) {
    int N = forms.size();
    int ans = INF;
    rep(st, dayLength) {
      int sum = 0;
      int time = st;
      rep(i, N) {
        sum += forms[i];
        (time += forms[i]) %= dayLength;
        if(time > openTime) {
          sum += dayLength - time;
          time = 0;
        }
      }
      ans = min(ans, sum);
    }
    
    return ans;
  }
};