제출 #1017386

#제출 시각아이디문제언어결과실행 시간메모리
1017386DorostWef저울 (IOI15_scales)C++17
55.56 / 100
1 ms600 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; #define gl getLightest #define gm getMedian #define gh getHeaviest #define gn getNextLightest void init(int T) { /* ... */ } void answe (vector <int> v) { int a[6]; for (int i = 0; i < 6; i++) a[i] = v[i]; answer (a); } void orderCoins() { /* ... */ int x, y, z, a, b, c; x = gl(1, 2, 3); y = gm(1, 2, 3); z = x ^ y; a = gl(4, 5, 6); b = gm(4, 5, 6); c = 7 ^ a ^ b; int w = gn (x, y, z, a); if (w != x) { vector <int> v = {x, y, z}; for (int i = 0; i < (int)v.size(); i++) { if (w == v[i]) { v.insert (v.begin() + i, a); break; } } w = gn(x, y, z, b); if (w != x) { for (int i = 0; i < (int)v.size(); i++) { if (w == v[i]) { v.insert (v.begin() + i, b); break; } } } else { v.push_back(b); } w = gn(x, y, z, c); if (w != x) { for (int i = 0; i < (int)v.size(); i++) { if (w == v[i]) { v.insert (v.begin() + i, c); break; } } } else { v.push_back(c); } answe (v); return; } else { int k = gm (a, b, x); if (k == a) { answe ({x, y, z, a, b, c}); return; } else if (k == b) { int l = gn (b, x, y, c); if (l == y) { answe ({a, b, x, c, y, z}); return; } else if (l == x) { answe ({a, b, c, x, y, z}); return; } else { if (gm (a, c, z) == c) { answe ({a, b, x, y, c, z}); return; } else { answe ({a, b, x, y, z, c}); return; } } } else { w = gn (x, y, z, b); vector <int> v = {a, x, y, z}; if (w == x) { v.push_back(b); } else { for (int i = 0; i < (int)v.size(); i++) { if (w == v[i]) { v.insert (v.begin() + i, b); break; } } } w = gn (x, y, z, c); if (w == x) { v.push_back(c); } else { for (int i = 0; i < (int)v.size(); i++) { if (w == v[i]) { v.insert (v.begin() + i, c); break; } } } answe (v); return; } } assert (false); }

컴파일 시 표준 에러 (stderr) 메시지

scales.cpp: In function 'void init(int)':
scales.cpp:12:15: warning: unused parameter 'T' [-Wunused-parameter]
   12 | void init(int T) {
      |           ~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...