| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 150406 | 갓띵건 (#200) | Wine Tasting (FXCUP4_wine) | C++17 | 10 ms | 772 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "bartender.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> BlendWines(int k, vector<int> r){
	int n = r.size();
	vector<int> v;
	for(int i=0;i<n;i++){
		r[i]=r[i]%10+1;
	}
	return r;
}
#include "taster.h"
#include <bits/stdc++.h>
using namespace std;
std::vector<int> SortWines(int k, vector<int> a) {
	int n = a.size();
	vector<int> v[11],ans;
	ans.resize(n);
	for(int i=0;i<n;i++){
		v[a[i]].push_back(i);
	}
	for(int i=1;i<=10;i++){
		if(v[i].size()==0) continue;
		else if(v[i].size()==1){
			ans[v[i][0]]=i;
		}
		else if(v[i].size()==2){
			if(Compare(v[i][0],v[i][1])>0) swap(v[i][0],v[i][1]); 
			ans[v[i][0]]=i;
			ans[v[i][1]]=i+10;
		}
		else{
			for(int t=0;t<3;t++){
				for(int j=0;j<t;j++){
					if(Compare(v[i][t],v[i][j])>0) swap(v[i][t],v[i][j]);
				}
			}
			for(int t=0;t<3;t++) ans[v[i][t]]=i+10*t;
		}
	}
	return ans;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
