제출 #431521

#제출 시각아이디문제언어결과실행 시간메모리
431521Rouge_Hugo카니발 티켓 (IOI20_tickets)C++14
11 / 100
2 ms716 KiB
#include<bits/stdc++.h> #define ll long long #define fi first #define se second #define pb push_back #include "tickets.h" #include <vector> using namespace std; vector<ll>v; long long 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++) { vector<int> row; row.pb(0);v.pb(x[i][0]); answer.push_back(row); } allocate_tickets(answer); ll re=0; sort(v.begin(),v.end()); for(int i=0;i<n;i++) { re+=abs(v[i]-v[n/2]); } return re; }

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

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