제출 #431524

#제출 시각아이디문제언어결과실행 시간메모리
431524Hazem카니발 티켓 (IOI20_tickets)C++14
11 / 100
2 ms588 KiB
#include "tickets.h" #include <vector> #include <bits/stdc++.h> #define LL long long using namespace std; vector<LL>vec; vector<vector<int>>vec1; long long find_maximum(int k, std::vector<std::vector<int>> x) { int n = x.size(); vec1 = x; for(int i=0;i<n;i++) vec.push_back(x[i][0]),vec1[i][0] = 0; sort(vec.begin(),vec.end()); LL ans = 0; for(int i=0;i<vec.size();i++) ans += abs(vec[i]-vec[vec.size()/2]); allocate_tickets(vec1); return ans; }

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

tickets.cpp: In function 'long long int find_maximum(int, std::vector<std::vector<int> >)':
tickets.cpp:21:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   21 |  for(int i=0;i<vec.size();i++)
      |              ~^~~~~~~~~~~
#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...