Submission #150844

# Submission time Handle Problem Language Result Execution time Memory
150844 2019-09-01T08:59:13 Z =SUM(D1:D9)(#3629, ydk1104, stet_stet, Hyperbolic) Wine Tasting (FXCUP4_wine) C++17
0 / 100
10 ms 676 KB
#include "bartender.h"

std::vector<int> BlendWines(int K, std::vector<int> R){
	int N = R.size();
	for(auto &i:R){
		if(i>5) i-=4;
		else i=1;
	}
	return R;
}
#include "taster.h"

std::vector<int> SortWines(int K, std::vector<int> A) {
	int N = A.size();
	for(int i=0; i<N; i++){
		if(A[i]>1) A[i]+=4;
		else{
			for(int j=0; j<N; j++){
				if(i==j) continue;
				if(Compare(i, j)==1) A[i]++;
			}
		} 
	}
	return A;
}

Compilation message

bartender.cpp: In function 'std::vector<int> BlendWines(int, std::vector<int>)':
bartender.cpp:4:6: warning: unused variable 'N' [-Wunused-variable]
  int N = R.size();
      ^
# Verdict Execution time Memory Grader output
1 Correct 10 ms 644 KB Correct
2 Correct 9 ms 644 KB Correct
3 Correct 9 ms 644 KB Correct
4 Incorrect 8 ms 676 KB Wrong
5 Halted 0 ms 0 KB -