Submission #411100

#TimeUsernameProblemLanguageResultExecution timeMemory
411100Dipto_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 = (ll) press(i); if (press == N) { return i; } } }

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:12:8: warning: unused variable 'g' [-Wunused-variable]
   12 |     ll g = (ll) press(i);
      |        ^
combo.cpp:6:19: warning: control reaches end of non-void function [-Wreturn-type]
    6 |   std::string p = "";
      |                   ^~