제출 #301636

#제출 시각아이디문제언어결과실행 시간메모리
301636maximath_1카니발 티켓 (IOI20_tickets)C++17
0 / 100
1 ms288 KiB
#include "tickets.h" #include <vector> #include <algorithm> using namespace std; long long find_maximum(int k, vector<vector<int>> x) { int n = x.size(); int m = x[0].size(); vector<vector<int>> as; as.resize(n); for(int i = 0; i < n; i ++) as[i].push_back(0); allocate_tickets(as); sort(x[0].begin(), x[0].end()); int md = n / 2; int ans = 0; for(int i = 0; i < n; i ++) ans += abs(x[0][i] - x[0][md]); return ans; }

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

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:8:6: warning: unused variable 'm' [-Wunused-variable]
    8 |  int m = x[0].size();
      |      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...