제출 #829985

#제출 시각아이디문제언어결과실행 시간메모리
829985Baytoro카니발 티켓 (IOI20_tickets)C++17
11 / 100
1 ms724 KiB
#include "tickets.h" //#include "grader.cpp" #include <bits/stdc++.h> using namespace std; //#define int long long long long find_maximum(int k, vector<vector<int>> x) { int n=x.size(),m=x[0].size(); if(m==1){ vector<vector<int>> ans(n,vector<int>(m,0)); int sum=0; vector<int> v; for(int i=0;i<n;i++) v.push_back(x[i][0]); sort(v.begin(),v.end()); sum=(v[n/2]); long long res=0; for(int i=0;i<n;i++) res+=abs(x[i][0]-sum); allocate_tickets(ans); return res; } }

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

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:22:1: warning: control reaches end of non-void function [-Wreturn-type]
   22 | }
      | ^
#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...