Submission #1346360

#TimeUsernameProblemLanguageResultExecution timeMemory
1346360421412412sfafa15콤보 (IOI18_combo)C++20
Compilation error
0 ms0 KiB
#include <iostream>
using namespace std;



string guess_sequence(int N){
    string p;
    char chars[4] = {'A','B','X','Y'};
    char char1; 
    char char2;
    char char3;


    if (N == 3){
        for (int i = 0; i < 4; i ++){
            char1 = chars[i];
            for (int j = 0; j < 4; j ++){
                char2 = chars[j];
                for (int k = 0; k < 4; l ++){
                    char1 = chars[k];
                    p = char1 + char2 + char3;
                    
                    if (press(p) == 3){
                        return p;
                    }
        }
        }
            
        }
        
    }
    return p;
}

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:19:40: error: 'l' was not declared in this scope
   19 |                 for (int k = 0; k < 4; l ++){
      |                                        ^
combo.cpp:23:25: error: 'press' was not declared in this scope
   23 |                     if (press(p) == 3){
      |                         ^~~~~