Submission #432226

#TimeUsernameProblemLanguageResultExecution timeMemory
432226jeqchoScales (IOI15_scales)C++17
34.05 / 100
1 ms256 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; typedef pair<int,int> pii; typedef vector<int> vi; typedef vector<pii> vpi; #define FOR(i,a,b) for(int i=a;i<b;++i) #define F0R(i,b) FOR(i,0,b) #define ROF(i,a,b) for(int i=b-1;i>=a;--i) #define R0F(i,b) ROF(i,0,b) #define trav(a,x) for(auto&a:x) #define all(x) begin(x),end(x) #define fi first #define se second #define pb push_back #define sz(x) int(x.size()) void init(int T) { /* ... */ } void orderCoins() { vi known; int mx = getHeaviest(1,2,3); int mn = getLightest(1,2,3); known.pb(mn); FOR(i,1,3+1) { if(i!=mx&&i!=mn)known.pb(i); } known.pb(mx); FOR(i,4,6+1) { ROF(t,1,sz(known)) { int md = getMedian(known[t-1],known[t],i); if(known[t]==md) { known.insert(known.end(),i); break; } else if(i==md) { known.insert(known.begin()+t,i); break; } else if(t-1==0) { known.insert(known.begin(),i); break; } } } int W[6]; F0R(i,6) { W[i]=known[i]; } answer(W); }

Compilation message (stderr)

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