제출 #305383

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

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

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