func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 1e6 + 100;   const int inf = 0x7ffffff;   int a[maxn];   long long dp[maxn];   int main(void) {     int n;     scanf( %d , &n);     for (int i = 1; i <= n; i++) scanf( %d , &a[i]);     dp[0] = 0;     for (int i = 1; i <= n; i++) {       dp[i] = dp[i - 1] + 20;       int pos1 = lower_bound(a + 1, a + n + 1, a[i] - 90 + 1) - a - 1;       int pos2 = lower_bound(a + 1, a + n + 1, a[i] - 1440 + 1) - a - 1;       long long t1 = (i - pos1 + 1) * 20;       long long t2 = (i - pos2 + 1) * 20;       dp[i] = min(dp[i], dp[pos1] + min(50LL, t1));       dp[i] = min(dp[i], dp[pos2] + min(120LL, t2));       printf( %I64d n , dp[i] - dp[i - 1]);     }     return 0;   }   