Submission #1006802

#TimeUsernameProblemLanguageResultExecution timeMemory
1006802GTACombo (IOI18_combo)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "combo.h" using namespace std; #define fr(m,n,k) for(int m=n;m<=k;m++) int n; string guess_sequence(int N) { vector<char> v(4) = {'A', 'B', 'X', 'Y'}; fr(i, 0, 3) { fr(j, 0, 3) { fr(l, 0, 3) { string p = v[i] + v[j] + v[l]; x = press(p); if (x == 3) { return p; } } } } return S; }

Compilation message (stderr)

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:8:21: error: expected ',' or ';' before '=' token
    8 |   vector<char> v(4) = {'A', 'B', 'X', 'Y'};
      |                     ^
combo.cpp:12:32: error: conversion from 'int' to non-scalar type 'std::string' {aka 'std::__cxx11::basic_string<char>'} requested
   12 |         string p = v[i] + v[j] + v[l];
combo.cpp:13:9: error: 'x' was not declared in this scope
   13 |         x = press(p);
      |         ^
combo.cpp:20:10: error: 'S' was not declared in this scope
   20 |   return S;
      |          ^