Submission #593840

#TimeUsernameProblemLanguageResultExecution timeMemory
593840davi_bartScales (IOI15_scales)C++14
33.33 / 100
1 ms308 KiB
#pragma GCC optimize("O3") #include <bits/stdc++.h> #include "scales.h" using namespace std; #define ll long long // #define int ll #define fi first #define se second #define ld long double #define pb push_back mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); void init(int T) { } void orderCoins() { vector<int> v = {1, 2, 3, 4, 5, 6}; for (int j = 3; j >= 0; j--) { for (int i = j; i < 4; i++) { int x = getLightest(v[i], v[i + 1], v[i + 2]); if (x == v[i + 1]) swap(v[i + 1], v[i]); else if (x == v[i + 2]) swap(v[i + 2], v[i]); } } int x = getHeaviest(v[0], v[4], v[5]); if (x == v[4]) swap(v[4], v[5]); answer(v.data()); }

Compilation message (stderr)

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