제출 #600500

#제출 시각아이디문제언어결과실행 시간메모리
600500UncoolAnon카니발 티켓 (IOI20_tickets)C++14
0 / 100
1 ms212 KiB
#include <bits/stdc++.h> #include "tickets.h" #define ll long long using namespace std; ll find_maximum(int k,vector<vector<int>> a){ ll answer=0; int n=a.size(),m=a[0].size(); vector<int> kek ; for(int i=0;i<n;++i) for(int j=0;j<m;j++) kek.push_back(a[i][j]); auto vanswer=a; for(auto&x:vanswer) for(int&y:x) y=0; sort(kek.begin(),kek.end()); for(int i=0;i<kek.size();i++) answer+=kek[i]*(kek.size()/2>i?-1:1); return answer; }

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

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