# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
676372 | valerikk | Liteh and Newfiteh (INOI20_litehfiteh) | C++17 | 114 ms | 27316 KiB |
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;
const int N = 1e5 + 7;
const int L = 22;
const int INF = 0x3f3f3f3f;
int n;
int a[N];
int dp[N][L];
int ndp[N][L];
int mn[N][L];
int kek[N];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
for (int i = 0; i < n; ++i) {
if (a[i] >= L) {
cout << "-1\n";
return 0;
}
}
memset(dp, 0x3f, sizeof dp);
for (int i = 0; i < n; ++i) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |