# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
86093 | zubec | Lottery (CEOI18_lot) | C++14 | 835 ms | 9352 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;
typedef long long ll;
typedef long double ld;
int n, l, a[20010], dp[110][10010], pos[10010], b[110], c[110];
int main(){
ios_base::sync_with_stdio(0);cin.tie(0);
cin >> n >> l;
for (int i = 1; i <= n; i++){
cin >> a[i];
a[i+n] = a[i];
}
int q;
cin >> q;
for (int i = 1; i <= q; i++){
cin >> b[i];
c[i] = b[i];
}
sort(c+1, c+q+1);
for (int i = 1; i <= q; i++){
pos[c[i]] = i;
}
pos[n+1] = q+1;
for (int i = n; i >= 0; i--){
if (pos[i] == 0)
pos[i] = pos[i+1];
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |