Submission #411099

#TimeUsernameProblemLanguageResultExecution timeMemory
411099Dipto_DebdipCombo (IOI18_combo)C++14
Compilation error
0 ms0 KiB
#include "combo.h" #include "bits/stdc++.h" using namespace std; #define ll long long int std::string guess_sequence(int N) { std::string p = ""; for (int i = 0; i < 4 * N; ++i) { p += 'A'; } std::vector<string> v = {"abx", "axb", "bax", "bxa", "xab", "xba", "aby", "ayb", "bay", "bya", "yab", "yba", "axy", "ayx", "xay", "xya", "yax", "yxa", "bxy", "byx", "xby", "xyb", "ybx", "yxb", "baa", "xaa", "yaa", "abb", "xbb", "ybb", "axx", "bxx", "yxx", "ayy", "byy", "xyy"}; for (auto i : v) { ll g = press(i); if (press == N) { return g; } } }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:13:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     if (press == N) {
      |         ~~~~~~^~~~
combo.cpp:14:14: error: could not convert 'g' from 'long long int' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   14 |       return g;
      |              ^
      |              |
      |              long long int