# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
150245 | 샌즈뼈 (#200) | 포도주 시음 (FXCUP4_wine) | C++17 | 11 ms | 1068 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "bartender.h"
using namespace std;
std::vector<int> BlendWines(int K, std::vector<int> R)
{
int N = R.size();
int i;
int C=6;
vector<int> ret(N);
for (i=0;i<N;i++) ret[i] = max(1,R[i]-C);
return ret;
}
#include <bits/stdc++.h>
#include "taster.h"
using namespace std;
int a[40];
bool comp(int e1, int e2)
{
if (a[e1]!=a[e2]) return a[e1]<a[e2];
return Compare(e1,e2)==-1;
}
std::vector<int> SortWines(int K, std::vector<int> A)
{
int N = A.size();
vector<int> arr(N), ans(N);
int i;
for (i=0;i<N;i++) a[i]=A[i];
for (i=0;i<N;i++) arr[i]=i;
sort(arr.begin(),arr.end(),comp);
for (i=0;i<N;i++)
ans[arr[i]] = i+1;
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |