| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 149008 | Seishun Buta Yarou wa Yumemiru Shoujo no Yume wo Minai (#200) | 포도주 시음 (FXCUP4_wine) | C++17 | 11 ms | 1060 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bartender.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> BlendWines(int k, vector<int> r) {
vector<int> a;
for(int i=0; i<r.size(); ++i) {
--r[i];
if(!r[i])
a.push_back(11);
else
a.push_back(r[i]%10+1);
}
return a;
}
#include "taster.h"
#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> c[12];
//i<j
bool cmp(int i, int j) {
if(i>=n||j>=n)
return i<j;
return Compare(i, j)<0;
}
vector<int> SortWines(int k, vector<int> a) {
n=a.size();
for(int i=a.size(); i<30; ++i)
a.push_back(i%10+1);
vector<int> b(30);
for(int i=0; i<30; ++i)
c[a[i]].push_back(i);
b[c[11][0]]=1;
if(!cmp(c[1][0], c[1][1]))
swap(c[1][0], c[1][1]);
b[c[1][0]]=11;
b[c[1][1]]=21;
for(int i=2; i<11; ++i) {
//find 2
if(cmp(c[1][1], c[i][0]))
swap(c[i][0], c[i][2]);
else if(cmp(c[1][1], c[i][1]))
swap(c[i][1], c[i][2]);
//find 1
if(cmp(c[1][0], c[i][0]))
swap(c[i][0], c[i][1]);
for(int j=0; j<3; ++j)
b[c[i][j]]=j*10+i;
}
return vector<int>(b.begin(), b.begin()+n);
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
