제출 #603748

#제출 시각아이디문제언어결과실행 시간메모리
603748CyberCowCarnival Tickets (IOI20_tickets)C++17
0 / 100
1 ms212 KiB
#include "tickets.h" #include <vector> #include <cmath> using namespace std; using ll = long long; ll qaq(vector<int> qaqa) { ll polni = 0; for (int i = 0; i < qaqa.size(); i++) { ll chsh = 0; for (int j = 0; j < qaqa.size(); j++) { chsh += abs(qaqa[i] - qaqa[j]); } polni = max(polni, chsh); } return polni; } 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(m); answer.push_back(row); } allocate_tickets(answer); return qaq(x[0]); }

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

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