Submission #456300

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4563002021-08-06 11:21:17lukadupliT-Covering (eJOI19_covering)C++14
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
#define f first
#define s second
using namespace std;
const int MAX = 1e6 + 5;
typedef pair <int, int> pii;
int n, m, k, sol;
int mat[MAX];
vector <int> occ[MAX];
pii specials[MAX];
map <set <int>> ls;
set <pii> spec_set;
bool bio[MAX];
int dx[] = {-1, 0, 0, 1};
int dy[] = {0, -1, 1, 0};
int mini;
pii dfs(int node){
bio[node] = 1;
int tiles = 0, visited = 0;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

covering.cpp:19:14: error: wrong number of template arguments (1, should be at least 2)
   19 | map <set <int>> ls;
      |              ^~
In file included from /usr/include/c++/10/map:61,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:81,
                 from covering.cpp:1:
/usr/include/c++/10/bits/stl_map.h:100:11: note: provided for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
  100 |     class map
      |           ^~~
covering.cpp: In function 'pii dfs(int)':
covering.cpp:43:19: error: invalid types 'int[int]' for array subscript
   43 |     for(int i : ls[node]){
      |                   ^
covering.cpp: In function 'int main()':
covering.cpp:83:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   83 |                 for(int a = 0; a < occ[i * m + j].size(); a++){
      |                                ~~^~~~~~~~~~~~~~~~~~~~~~~
covering.cpp:84:42: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   84 |                     for(int b = a + 1; b < occ[i * m + j].size(); b++){
      |                                        ~~^~~~~~~~~~~~~~~~~~~~~~~
covering.cpp:85:27: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
   85 |                         ls[occ[i * m + j][a]].insert(occ[i * m + j][b]);
      |                           ^
covering.cpp:86:27: error: invalid types 'int[__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}]' for array subscript
   86 |                         ls[occ[i * m + j][b]].insert(occ[i * m + j][a]);
      |                           ^