제출 #58569

#제출 시각아이디문제언어결과실행 시간메모리
58569ngkan146Scales (IOI15_scales)C++11
45.45 / 100
5 ms680 KiB
#include "scales.h"
#include <bits/stdc++.h>
using namespace std;

void init(int T) {
    /* do nothing */
}

void orderCoins() {
	int res[6];
	vector <int> lst;
	for(int i=1;i<=6;i++)	lst.push_back(i);
	
	for(int i=0;i<=5;i++){
		if (i == 0 || i == 1 || i == 2 || i == 3){
			int good = getLightest(lst[i], lst[i+1], lst[i+2]);	
			if (good == lst[i+1])	swap(lst[i], lst[i+1]);
			else if (good == lst[i+2])	swap(lst[i], lst[i+2]);
		}
		if (i == 2){
			int good = getLightest(lst[i], lst[i+2], lst[i+3]);	
			if (good == lst[i+2])	swap(lst[i], lst[i+2]);
			else if (good == lst[i+3])	swap(lst[i], lst[i+3]);
		}
		if (i == 0 || i == 1){
			int good = getLightest(lst[i], lst[i+3], lst[i+4]);	
			if (good == lst[i+3])	swap(lst[i], lst[i+3]);
			else if (good == lst[i+4])	swap(lst[i], lst[i+4]);
		}
		if (i == 0){
			int good = getLightest(lst[i], lst[i+4], lst[i+5]);	
			if (good == lst[i+4])	swap(lst[i], lst[i+4]);
			else if (good == lst[i+5])	swap(lst[i], lst[i+5]);
		}
	}
	if (getMedian(lst[3], lst[4], lst[5]) == lst[5])
		swap(lst[4], lst[5]);
	for(int i=0;i<6;i++)	res[i] = lst[i];
	answer(res);
}

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