제출 #520137

#제출 시각아이디문제언어결과실행 시간메모리
520137silverfish저울 (IOI15_scales)C++14
20 / 100
1 ms332 KiB
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;
 
void init(int T) {
	return;
}
 
void orderCoins() {
	int w[] = {1, 2, 3, 4, 5, 6};
	vector<int> lst = {0, 2, 3, 2, 1, 0, 2, 3};
		for(int i : lst){
		  int v = getLightest(w[i], w[i+1], w[i+2]);
		  for(int j = i; j <= i+2; ++j) if(v == w[j]) swap(w[i], w[j]);
		  v = getMedian(w[i], w[i+1], w[i+2]);
		  for(int j = i; j <= i+2; ++j) if(v == w[j]) swap(w[i+1], w[j]);
		}
	answer(w);
	return;
}

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

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