This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "combo.h"
using namespace std;
#define debug
#define pb push_back
#define lp(i,a,b) for(int i=a;i<b;i++)
#define pii pair<int,int>
#define ll long long
#define ff first
#define ss second
#define pb push_back
#include <assert.h>>
#define mk make_pair
string guess_sequence(int tam)
{
if(tam != 3) while(1);
string p ;
p.resize( tam+1 ) ;
char c[4] = {'A' , 'B' , 'X' , 'Y'} ;
lp(i,0,4)
lp(j,0,4)
lp(k,0,4)
{
p[0] = c[i] ;
p[1] = c[j] ;
p[2] = c[k] ;
if( press(p) == tam ) return p ;
}
//while(1);
}
Compilation message (stderr)
combo.cpp:11:20: warning: extra tokens at end of #include directive
11 | #include <assert.h>>
| ^
combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:35:1: warning: control reaches end of non-void function [-Wreturn-type]
35 | }
| ^
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |