func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<int> myvec;   long long int dp[100003];   int main() {     int t1, t2, x, index1, index2, time, n;     vector<int>::iterator it, it2;     cin >> n;     myvec.push_back(0);     dp[0] = 0;     for (int i = 0; i < n; i++) cin >> x, myvec.push_back(x);     for (int i = 1; i <= n; i++) {       time = myvec[i];       t1 = max(0, myvec[i] - 90);       t2 = max(0, myvec[i] - 1440);       it = upper_bound(myvec.begin(), myvec.end(), t1);       it2 = upper_bound(myvec.begin(), myvec.end(), t2);       index1 = it - myvec.begin();       index2 = it2 - myvec.begin();       if (myvec[i] - 90 < 0) {         dp[i] = min(dp[0] + 50, dp[0] + 120);         dp[i] = min(dp[i], dp[i - 1] + 20);       } else {         if (myvec[i] - 1440 < 0)           dp[i] = min(dp[index1 - 1] + 50, dp[0] + 120);         else           dp[i] = min(dp[index1 - 1] + 50, dp[index2 - 1] + 120);         dp[i] = min(dp[i], dp[i - 1] + 20);       }     }     for (int i = 1; i <= n; i++) cout << dp[i] - dp[i - 1] << endl;     return 0;   }   