제출 #608693

#제출 시각아이디문제언어결과실행 시간메모리
608693loctildore저울 (IOI15_scales)C++14
0 / 100
1 ms308 KiB
#include "scales.h" #include <bits/stdc++.h> using namespace std; // trans rights #define ll long long #define f first #define s second #define endl '\n' #define all(x) begin(x), end(x) void init(int T) {} int a,b,c,tmp; vector<int> v1,v2,v3,v4; vector<int> v; void srt(int &x, int &y, int &z) { tmp=getLightest(x,y,z); if (y==tmp) { swap(x,y); } if (z==tmp) { swap(x,z); } tmp=getMedian(x,y,z); if (z==tmp) { swap(y,z); } } void orderCoins() { a=2,b=3,c=5; v={1,4,6}; srt(a,b,c); srt(v[0],v[1],v[2]); bool flag=false; for (auto i : v) { if (!flag) { tmp=getMedian(a,b,i); if (tmp==a) { v1.push_back(i); } if (tmp==i) { v2.push_back(i); } if (tmp==b) { flag=true; } } if (flag) { tmp=getMedian(b,c,i); if (tmp==i) { v3.push_back(i); } else { v4.push_back(i); } } } vector<int> ans; for (auto i:v1) ans.push_back(i); ans.push_back(a); for (auto i:v2) ans.push_back(i); ans.push_back(b); for (auto i:v3) ans.push_back(i); ans.push_back(c); for (auto i:v4) ans.push_back(i); answer(&ans[0]); }

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

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