#include <bits/stdc++.h>   using namespace std;   long long a[100005], c[100005];   int main() {     long long n;     cin >> n;     for (long long i = 1; i <= n; i++) {       cin >> a[i];     }     for (int i = 1; i <= n; i++) {       c[i] = c[i - 1] + 20;       long long x = upper_bound(a + 1, a + 1 + n, a[i] - 90) - a;       c[i] = min(c[i], c[x - 1] + 50);       x = upper_bound(a + 1, a + 1 + n, a[i] - 1440) - a;       c[i] = min(c[i], c[x - 1] + 120);     }     for (int i = 1; i <= n; i++) {       cout << c[i] - c[i - 1] << endl;     }   }   