| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1325361 | minh30082008 | 저울 (IOI15_scales) | C++20 | 0 ms | 332 KiB |
#include "scales.h"
#include <algorithm>
bool heavier(int a, int b) {
int c = 1;
while (c == a || c == b) c++;
int h = getHeaviest(a, b, c);
return (h == a);
}
void init(int T) {
return;
}
void orderCoins() {
int w[6] = {1, 2, 3, 4, 5, 6};
// bubble sort
for (int i = 0; i < 6; i++) {
for (int j = i + 1; j < 6; j++) {
if (heavier(w[i], w[j])) {
std::swap(w[i], w[j]);
}
}
}
answer(w);
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
