제출 #715809

#제출 시각아이디문제언어결과실행 시간메모리
715809adamjinweiScales (IOI15_scales)C++14
45.45 / 100
1 ms340 KiB
#include <bits/stdc++.h> #include "scales.h" #define inf 1000000007 #define mod 1000000007 // #define int long long // #pragma GCC optimize("Ofast","inline","-ffast-math") // #pragma GCC target("avx,sse2,sse3,sse4,mmx") using namespace std; template <typename T> void read(T &x){ x=0;char ch=getchar();int fh=1; while (ch<'0'||ch>'9'){if (ch=='-')fh=-1;ch=getchar();} while (ch>='0'&&ch<='9')x=x*10+ch-'0',ch=getchar(); x*=fh; } template <typename T> void write(T x) { if (x<0) x=-x,putchar('-'); if (x>9) write(x/10); putchar(x%10+'0'); } template <typename T> void writeln(T x) { write(x); puts(""); } void init(int tc) { } void orderCoins() { vector<int> cur,ans; for(int i=1;i<=6;++i) cur.push_back(i); int mn=getLightest(getLightest(cur[0],cur[1],cur[2]),cur[3],cur[4]); mn=getLightest(mn,cur[5],(cur[0]==mn?cur[1]:cur[0])); ans.push_back(mn);cur.erase(find(cur.begin(),cur.end(),mn)); mn=getLightest(getLightest(cur[0],cur[1],cur[2]),cur[3],cur[4]); ans.push_back(mn);cur.erase(find(cur.begin(),cur.end(),mn)); mn=getLightest(cur[0],cur[1],cur[2]); mn=getLightest(mn,cur[3],(cur[0]==mn?cur[1]:cur[0])); ans.push_back(mn);cur.erase(find(cur.begin(),cur.end(),mn)); mn=getLightest(cur[0],cur[1],cur[2]); ans.push_back(mn); int mid=getMedian(cur[0],cur[1],cur[2]); ans.push_back(mid); cur.erase(find(cur.begin(),cur.end(),mn)); cur.erase(find(cur.begin(),cur.end(),mid)); ans.push_back(cur[0]); int W[6]; for(int i=0;i<6;++i) W[i]=ans[i]; answer(W); }

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

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