This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1010;
int n;
ll x[N], mx[N];
int main(){
ios_base::sync_with_stdio(0); cin.tie(0);
#ifdef _LOCAL
freopen("in.txt","r",stdin);
#endif // _LOCAL
cin >> n;
for (int i = 0; i < n; i++)
cin >> x[i];
for (int i = 0; i < n; i++){
mx[i] = 0;
while ((1ll << (mx[i] + 1)) <= x[i])
mx[i]++;
for (int j = 0; j < i; j++){
if (mx[i] / 4 == mx[j] / 4)
cout << "1 "; else
if (mx[i] / 16 == mx[j] / 16)
cout << "2 ";
else cout << "3 ";
}
cout << '\n';
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |