제출 #1078797

#제출 시각아이디문제언어결과실행 시간메모리
1078797UmairAhmadMirza카니발 티켓 (IOI20_tickets)C++17
0 / 100
1 ms600 KiB
#include <bits/stdc++.h> using namespace std; int const N=1505; void allocate_tickets( vector<vector<int>> _x); long long find_maximum(int k, vector<vector<int>> d){ vector<int> all; int n=d.size(); int m=d[0].size(); vector<vector<int>> x=d; for(int i=0;i<n;i++) for(int j=0;j<n;j++) x[i][j]=-1; for(int i=0;i<n;i++){ x[i][0]=0; all.push_back(d[i][0]); } allocate_tickets(x); sort(all.begin(),all.end()); long long ans=0; for(int i=0;i<n;i++) ans+=abs(all[n/2]-all[i]); return ans; }

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

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