제출 #928140

#제출 시각아이디문제언어결과실행 시간메모리
928140SUNWOOOOOOOO카니발 티켓 (IOI20_tickets)C++17
0 / 100
1 ms348 KiB
#include "tickets.h" #include <bits/stdc++.h> using namespace std; using LL = long long; LL find_maximum(int k, vector<vector<int>> x) { int n = x.size(), m = x[0].size(); LL ans = 0; for (int i = 0; i < n; i++){ LL sum = 0; for (int j = 0; j < n; j++) sum += llabs(x[j][0] - x[i][0]); ans = min(ans, sum); } vector<vector<int>> S; for (int i = 0; i < n; i++) S.push_back({0}); allocate_tickets(S); return ans; }

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

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