Submission #985498

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
9854982024-05-18 01:52:59vjudge2Council (JOI23_council)C++17
78 / 100
4008 ms92756 KiB
#include <bits/stdc++.h>
using namespace std;
void update(vector<pair<int, int>>& a, vector<pair<int, int>>& b) {
vector<pair<int, int>> u;
set<int> occ;
for (auto& x : a) if (x.first != -1) u.push_back(x);
for (auto& y : b) if (y.first != -1) u.push_back(y);
sort(u.begin(), u.end(), [] (pair<int, int> x, pair<int, int> y) {
return x.first > y.first;
});
a.clear();
for (int i = 0; i < u.size(); i++) {
if (!occ.count(u[i].second) && u[i].first != -1) {
a.push_back(u[i]);
occ.insert(u[i].second);
}
}
while ((int) a.size() > 2) a.pop_back();
}
int main() {
ios::sync_with_stdio(0); cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> a(n, 0), freq(m, 0), b(n, 0);
vector<vector<pair<int, int>>> dp(1 << m);
for (int i = 0; i < n; i++) {
int x;
for (int j = 0; j < m; j++) {
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

council.cpp: In function 'void update(std::vector<std::pair<int, int> >&, std::vector<std::pair<int, int> >&)':
council.cpp:13:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::pair<int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   13 |     for (int i = 0; i < u.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...