# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
126004 | Runtime_error_ | Lottery (CEOI18_lot) | C++14 | 671 ms | 8696 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=1e4+9,Q=109;
int n,l,q,a[N],id[N],ans[N][Q],where[N],tmp[N],pre[N];
pair<int,int> query[N];
int main(){
scanf("%d%d",&n,&l);
for(int i=1;i<=n;i++)
scanf("%d",a+i);
scanf("%d",&q);
for(int i=1;i<=q;i++)
scanf("%d",&query[i].first),query[i].second = i;
sort(query+1,query+1+q);
for(int i=1;i<=q;i++)
id[ query[i].second ] = i;
for(int i=0;i<=l;i++){
where[i] = q+1;
for(int j=1;j<=q;j++){
if(query[j].first >= i){
where[i] = j;
break;
}
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... |