제출 #150245

#제출 시각아이디문제언어결과실행 시간메모리
150245샌즈뼈 (#200)포도주 시음 (FXCUP4_wine)C++17
9 / 100
11 ms1068 KiB
#include <bits/stdc++.h> #include "bartender.h" using namespace std; std::vector<int> BlendWines(int K, std::vector<int> R) { int N = R.size(); int i; int C=6; vector<int> ret(N); for (i=0;i<N;i++) ret[i] = max(1,R[i]-C); return ret; }
#include <bits/stdc++.h> #include "taster.h" using namespace std; int a[40]; bool comp(int e1, int e2) { if (a[e1]!=a[e2]) return a[e1]<a[e2]; return Compare(e1,e2)==-1; } std::vector<int> SortWines(int K, std::vector<int> A) { int N = A.size(); vector<int> arr(N), ans(N); int i; for (i=0;i<N;i++) a[i]=A[i]; for (i=0;i<N;i++) arr[i]=i; sort(arr.begin(),arr.end(),comp); for (i=0;i<N;i++) ans[arr[i]] = i+1; return ans; }

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

taster.cpp: In function 'std::vector<int> SortWines(int, std::vector<int>)':
taster.cpp:22:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for (i=0;i<N;i++)
     ^~~
taster.cpp:25:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  return ans;
  ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...