# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
59621 | reality | 저울 (IOI15_scales) | C++17 | 3 ms | 768 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "scales.h"
#include "bits/stdc++.h"
using namespace std;
#define fi first
#define se second
#define ll long long
#define dbg(v) cerr<<#v<<" = "<<v<<'\n'
#define vi vector<int>
#define vl vector <ll>
#define pii pair<int,int>
#define mp make_pair
#define db long double
#define pb push_back
#define all(s) s.begin(),s.end()
template < class T > T smin(T &a,T b) {if (a > b) a = b;return a;}
template < class T > T smax(T &a,T b) {if (a < b) a = b;return a;}
//getHeaviest
//getLightest
//getMedian
//getNextLightest
void init(int T) {
return;
}
/*int dp[1 << 24];
int fr[1 << 24];
const int N = 14348907;
const int p3[] = {1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441, 1594323, 4782969};
*/
int h[33][33];
void orderCoins() {
for (int i = 1;i <= 6;++i)
for (int j = i + 1;j <= 6;++j) {
int k = 1;
while (k == i || k == j)
++k;
int a = getLightest(i,j,k);
int b = getMedian(i,j,k);
int c = i + j + k - a - b;
if (i == a || (i == b && j == c))
h[i][j] = 1;
else
h[j][i] = 1;
}
vi p(6);
for (int i = 0;i < 6;++i)
p[i] = i + 1;
sort(all(p),[&](int x,int y) {
return h[x][y];
});
answer(p.data());
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |