Submission #644935

#TimeUsernameProblemLanguageResultExecution timeMemory
644935a_aguiloVision Program (IOI19_vision)C++14
Compilation error
0 ms0 KiB
#include "vision.h" #include<bits/stdc++.h> using namespace std; void construct_network(int H, int W, int K) { vector<int> possibilities; memset(possibilities, 0, sizeof(possibilities)); for(int w = 0; w <= min(K, W-1); ++w){ int h = K - w; if(h >= H) continue; possibilities.push_back(add_and({0, h*W+w})); } add_or(possibilities); }

Compilation message (stderr)

vision.cpp: In function 'void construct_network(int, int, int)':
vision.cpp:8:9: error: cannot convert 'std::vector<int>' to 'void*'
    8 |  memset(possibilities, 0, sizeof(possibilities));
      |         ^~~~~~~~~~~~~
      |         |
      |         std::vector<int>
In file included from /usr/include/features.h:461,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/os_defines.h:39,
                 from /usr/include/x86_64-linux-gnu/c++/10/bits/c++config.h:518,
                 from /usr/include/c++/10/bits/stl_algobase.h:59,
                 from /usr/include/c++/10/vector:60,
                 from vision.h:5,
                 from vision.cpp:1:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:59:1: note:   initializing argument 1 of 'void* memset(void*, int, size_t)'
   59 | __NTH (memset (void *__dest, int __ch, size_t __len))
      | ^~~~~