# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
968723 | APROHACK | Scales (IOI15_scales) | C++17 | 1 ms | 436 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "scales.h"
using namespace std;
void init(int T) {
/* ... */
}
vector<int> obtener_monedas(set<int>&num){
vector<int>ans;
for(auto i : num){
// i va tomar el valor de cada elemento en el set
ans.push_back(i);
}
return ans;
}
void orderCoins() {
/* ... */
int w[6];
set<int> num = {1,2,3,4,5,6};
int a = getLightest(1,2,3);
int b = getLightest(4,5,6);
int c;
for (int i = 0; i < 3; i++){
if (a != i+1){
c = i+1;
break;
}
}
w[0] = getLightest(a,b,c);
num.erase(w[0]);
vector<int> numeros = obtener_monedas(num);
a = getLightest(numeros[0], numeros[1], numeros[2]);
w[1] = getLightest(a, numeros[3], numeros[4]);
num.erase(w[1]);
numeros = obtener_monedas(num);
a = getLightest(numeros[0], numeros[1], numeros[2]);
w[2] = getMedian (w[1], a, numeros[3]);
num.erase(w[2]);
numeros = obtener_monedas(num);
w[3] = getLightest(numeros[0], numeros[1], numeros[2]);
w[4] = getMedian(numeros[0], numeros[1], numeros[2]);
num.erase(w[3]);
num.erase(w[4]);
numeros = obtener_monedas(num);
w[5] = numeros[0];
answer(w);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |