Submission #150804

#TimeUsernameProblemLanguageResultExecution timeMemory
150804욱방켜!! (twitch.tv/wookje) (#200)Wine Tasting (FXCUP4_wine)C++17
0 / 100
9 ms1088 KiB
#include "bartender.h" std::vector<int> BlendWines(int K, std::vector<int> R){ if(R.size() == 1) return R; for(int i=0; i<R.size(); i++){ R[i]--; if(R[i] >= 1) R[i]--; } return R; }
#include "taster.h" std::vector<int> SortWines(int K, std::vector<int> A) { if(A.size() == 1) return A; std::vector<int> one; for(int i=0; i<A.size(); i++) if(A[i] == 0) one.push_back(i); int a = one[0], b = one[1]; int better = (Compare(a, b) == -1)? a : b; for(int i=0; i<A.size(); i++) if(i != better) A[i]++; for(int i=0; i<A.size(); i++) A[i]++; return A; }

Compilation message (stderr)

bartender.cpp: In function 'std::vector<int> BlendWines(int, std::vector<int>)':
bartender.cpp:5:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0; i<R.size(); i++){
               ~^~~~~~~~~

taster.cpp: In function 'std::vector<int> SortWines(int, std::vector<int>)':
taster.cpp:6:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0; i<A.size(); i++) if(A[i] == 0) one.push_back(i);
               ~^~~~~~~~~
taster.cpp:9:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0; i<A.size(); i++) if(i != better) A[i]++;
               ~^~~~~~~~~
taster.cpp:10:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for(int i=0; i<A.size(); i++) A[i]++;
               ~^~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...