# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
229524 | 534351 | Wine Tasting (FXCUP4_wine) | C++17 | 11 ms | 1120 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 "bartender.h"
std::vector<int> BlendWines(int K, std::vector<int> R){
int N = R.size();
for(auto &i:R){
if(i>5) i-=4;
else i=1;
}
return R;
}
#include "taster.h"
std::vector<int> SortWines(int K, std::vector<int> A) {
int N = A.size();
int sum[31] = {0, };
for(int i=0; i<N; i++){
if(A[i]>1) A[i]+=4;
else{
for(int j=i+1; j<N; j++){
if(A[j]<=1){
if(Compare(i, j)==1) A[i]++;
else sum[j]++;
}
}
A[i] += sum[i];
}
}
return A;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |