Submission #400145

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4001452021-05-07 13:08:58johuthaPolitical Development (BOI17_politicaldevelopment)C++14
Compilation error
0 ms0 KiB
#include <iostream>
#include <vector>
#include <unordered_set>
#include <bitset>
#include <cassert>
#define bs bitset<10>
using namespace std;
struct findcliq
{
int n;
bitset<10> b;
vector<bitset<10>> adjmat;
int find()
{
assert(n <= 10);
b.resize(1<<n);
b[0] = 1;
int mmax = 0;
for (int i = 1; i < (1<<n); i++)
{
for (int ad = 0; ad < n; ad++)
{
if (!(i & (1<<ad))) continue;
int ls = i - (1<<ad);
if (!b[ls]) continue;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

politicaldevelopment.cpp: In member function 'int findcliq::find()':
politicaldevelopment.cpp:20:11: error: 'class std::bitset<10>' has no member named 'resize'; did you mean 'size'?
   20 |         b.resize(1<<n);
      |           ^~~~~~
      |           size
politicaldevelopment.cpp: At global scope:
politicaldevelopment.cpp:65:5: error: 'multiset' does not name a type
   65 |     multiset<pair<int,int>> act;
      |     ^~~~~~~~
politicaldevelopment.cpp: In member function 'int graph::solve()':
politicaldevelopment.cpp:72:13: error: 'act' was not declared in this scope
   72 |             act.insert({adjset[i].size(), i});
      |             ^~~
politicaldevelopment.cpp:75:17: error: 'act' was not declared in this scope
   75 |         while (!act.empty())
      |                 ^~~
politicaldevelopment.cpp:84:48: error: no matching function for call to 'std::vector<std::bitset<10> >::resize(int&, std::vector<bool>)'
   84 |             fq.adjmat.resize(n, vector<bool>(n));
      |                                                ^
In file included from /usr/include/c++/9/vector:67,
                 from politicaldevelopment.cpp:2:
/usr/include/c++/9/bits/stl_vector.h:934:7: note: candidate: 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::bitset<10>; _Alloc = std::allocator<std::bitset<10> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]'
  934 |       resize(size_type __new_size)
      |       ^~~~~~
/usr/include/c++/9/bits/stl_vector.h:934:7: note:   candidate expects 1 argument, 2 provided
/usr/include/c++/9/bits/stl_vector.h:954:7: note: candidate: 'void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::bitset<10>; _Alloc = std::allocator<std::bitset<10> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::bitset<10>]'
  954 |       resize(size_type __new_size, const value_type& __x)
      |       ^~~~~~
/usr/include/c++/9/bits/stl_vector.h:954:54: note:   no known conversion for argument 2 from 'std::vector<bool>' to 'const value_type&' {aka 'const std::bitset<10>&'}
  954 |       resize(size_type __new_size, const value_type& __x)
      |                                    ~~~~~~~~~~~~~~~~~~^~~