Submission #1170285

#TimeUsernameProblemLanguageResultExecution timeMemory
1170285moha1111콤보 (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include "bits/stdc++.h"
#include "combo.h#include "bits/stdc++.h"
#include "combo.h"
using namespace std;

string guess_sequence(int N)
{
    string s = "";
    int con = 0;
    while(con < min(4 * N , 8000))
    {
        if(press(s + "A") == s.size() + 1)
            s += "A";

        else if(press(s + "B") == s.size() + 1)
            s += "B";

        else if(press(s + "X") == s.size() + 1)
            s += "X";
        
        else
            s += "Y";

        con++;
    }
    return s;
}

using namespace std;

string guess_sequence(int N)
{
    string s = "";
    while(s.size() < min(4 * N , 8000))
    {
        if(press(s + "A") == s.size() + 1)
            s += "A";

        else if(press(s + "B") == s.size() + 1)
            s += "B";

        else if(press(s + "X") == s.size() + 1)
            s += "X";
        
        else
            s += "Y";
    }
    return s;
}

Compilation message (stderr)

combo.cpp:2:10: error: #include expects "FILENAME" or <FILENAME>
    2 | #include "combo.h#include "bits/stdc++.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~
combo.cpp:2:41: warning: missing terminating " character
    2 | #include "combo.h#include "bits/stdc++.h"
      |                                         ^
combo.cpp:31:8: error: redefinition of 'std::string guess_sequence(int)'
   31 | string guess_sequence(int N)
      |        ^~~~~~~~~~~~~~
combo.cpp:6:8: note: 'std::string guess_sequence(int)' previously defined here
    6 | string guess_sequence(int N)
      |        ^~~~~~~~~~~~~~