Submission #344596

#TimeUsernameProblemLanguageResultExecution timeMemory
344596RakhmandXoractive (IZhO19_xoractive)C++14
Compilation error
0 ms0 KiB
#include "interactive.h" #include <iostream> using namespace std; int ans[110]; bool check(vector<int> x, int a, int b, int c, int d){ vector<int> kek = {a, b, c, d}; vector<int> check; for(int i = 0; i < kek.size(); i++){ for(int j = 0; j < kek.size(); j++){ check.push_back(kek[i] ^ kek[j]); } } sort(check.begin(), check.end()); if(x == check) return true; else return false; } vector<int> oh[1010]; vector<int> guess(int n) { vector<int> ans; for(int i = 0; i < n; i++) ans.push_back(ask(i + 1)); return ans; }

Compilation message (stderr)

Xoractive.cpp: In function 'bool check(std::vector<int>, int, int, int, int)':
Xoractive.cpp:10:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   10 |     for(int i = 0; i < kek.size(); i++){
      |                    ~~^~~~~~~~~~~~
Xoractive.cpp:11:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   11 |         for(int j = 0; j < kek.size(); j++){
      |                        ~~^~~~~~~~~~~~
Xoractive.cpp:15:5: error: 'sort' was not declared in this scope; did you mean 'qsort'?
   15 |     sort(check.begin(), check.end());
      |     ^~~~
      |     qsort