제출 #1033002

#제출 시각아이디문제언어결과실행 시간메모리
1033002fv3카니발 티켓 (IOI20_tickets)C++14
11 / 100
1 ms604 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; ll find_maximum(int k, vector<vector<int>> x) { int N = x.size(); int M = x[0].size(); vector<vector<int>> answer; for (int i = 0; i < N; i++) { answer.push_back( {0} ); } allocate_tickets(answer); sort(x.begin(), x.end()); ll res = 0; for (int i = 0; i < N; i++) { res += abs(x[i][0] - x[N / 2][0]); } return res; }

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

tickets.cpp: In function 'll find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:11:6: warning: unused variable 'M' [-Wunused-variable]
   11 |  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...