제출 #73089

#제출 시각아이디문제언어결과실행 시간메모리
73089MKopchevScales (IOI15_scales)C++14
0 / 100
5 ms1096 KiB
#include<bits/stdc++.h> #include "scales.h" using namespace std; void init(int T) { } int output[6]; vector<int> get(int a,int b,int c) { vector<int> ret={}; ret.push_back(getHeaviest(a,b,c)); ret.push_back(getMedian(a,b,c)); ret.push_back(a+b+c-ret[0]-ret[1]); return ret; } bool cmp(int x,int y) { return output[x-1]>output[y-1]; } vector<int> get_real(vector<int> i) { sort(i.begin(),i.end(),cmp); return i; } void orderCoins() { for(int i=1;i<=6;i++) output[i-1]=i; vector<int> order_1=get(1,2,3); vector<int> order_2=get(4,5,6); vector<int> order_3=get(1,3,5); vector<int> order_4=get(2,4,6); vector<int> order_5=get(1,3,6); vector<int> order_6=get(1,3,4); int out=1; do { if(get_real({1,2,3})==order_1&& get_real({4,5,6})==order_2&& get_real({1,3,5})==order_3&& get_real({2,4,6})==order_4&& get_real({1,3,6})==order_5&& get_real({1,3,4})==order_6 ) { //answer(output); out++; } } while(next_permutation(output,output+6)); assert(out==1); answer(output); }

컴파일 시 표준 에러 (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:4:15: warning: unused parameter 'T' [-Wunused-parameter]
 void init(int T)
               ^
#Verdict Execution timeMemoryGrader output
Fetching results...