# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
604308 | cheissmart | 저울 (IOI15_scales) | C++14 | 1 ms | 232 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "scales.h"
#include <bits/stdc++.h>
#define F first
#define S second
#define V vector
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define SZ(v) int((v).size())
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
typedef V<int> vi;
const int INF = 1e9 + 7;
void init(int T) {
}
void orderCoins() {
vi ans(6); iota(ALL(ans), 1);
auto go = [&] (int x, int y, int z) {
int a = ans[x], b = ans[y], c = ans[z];
int mx = getHeaviest(a, b, c);
int mn = getLightest(a, b, c);
int md = a ^ b ^ c ^ mx ^ mn;
ans[x] = mn, ans[y] = md, ans[z] = mx;
};
for(int i = 0; i < 4; i++)
go(i, i + 1, i + 2);
for(int i = 3; i >= 0; i--)
go(i, i + 1, i + 2);
int W[] = {ans[0], ans[1], ans[2], ans[3], ans[4], ans[5]};
answer(W);
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |