Submission #59621

#TimeUsernameProblemLanguageResultExecution timeMemory
59621realityScales (IOI15_scales)C++17
0 / 100
3 ms768 KiB
#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()); }

Compilation message (stderr)

In file included from grader.c:2:0:
graderlib.c: In function 'void answer(int*)':
graderlib.c:53:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
     if (_ghksjhdfkae19ga_ > 1) 
     ^~
graderlib.c:56:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  for (i = 0; i < 6; i++) {
  ^~~
scales.cpp: In function 'void init(int)':
scales.cpp:22:15: warning: unused parameter 'T' [-Wunused-parameter]
 void init(int T) {
               ^
#Verdict Execution timeMemoryGrader output
Fetching results...