Submission #485440

#TimeUsernameProblemLanguageResultExecution timeMemory
485440AmirElarbiScales (IOI15_scales)C++14
0 / 100
1 ms204 KiB
#include <bits/stdc++.h> #include "scales.h" #define vi vector<int> #define ve vector #define ll long long #define vf vector<float> #define vll vector<pair<ll,ll>> #define ii pair<int,int> #define vvi vector<vi> #define vii vector<ii> #define gii greater<ii> #define pb push_back #define fi first #define se second #define INF 1e9 #define eps 1e-7 #define eps1 1e-25 #define optimise ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL); #define MAX_A 1e5+5 #define V 450 using namespace std; const int MOD = 1e9+7; const int nax = 200005; int w[6],a[6]; void init(int T) { return; } void orderCoins() { int light = getLightest(1,2,3), hev = getHeaviest(1,2,3); light = getLightest(light,4,5), hev = getHeaviest(hev,4,5); if(light!=4) light = getLightest(light,4,6); else light = getLightest(light,5,6); if(hev!=4) hev = getHeaviest(hev,4,6); else hev = getHeaviest(hev,5,6); w[0] = light; a[light-1] = 1; vi s; for(int i = 0; i < 6; i++){ if(!a[i]){s.pb(i+1);} } int res = getNextLightest(s[0],s[1],s[2],light); w[1] = light = getLightest(res,s[3],s[4]); a[light-1] = true; s.clear(); for(int i = 0; i < 6; i++){ if(!a[i]){s.pb(i+1);} } res = getNextLightest(s[0],s[1],s[2],light); w[2] = light = getMedian(res,s[3],w[1]); a[light-1] = true; s.clear(); for(int i = 0; i < 6; i++){ if(!a[i]){s.pb(i+1);} } w[3] = light = getNextLightest(s[0],s[1],s[2],light); a[light-1] = true; w[5] = hev; for(int i = 0; i < 6; i++){ if(!a[i]){w[4] = i; break;} } answer(w); }

Compilation message (stderr)

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