Submission #138167

# Submission time Handle Problem Language Result Execution time Memory
138167 2019-07-29T13:44:22 Z ly20 Combo (IOI18_combo) C++17
5 / 100
5 ms 280 KB
#include "combo.h"

#include <bits/stdc++.h>

using namespace std;

map<int,char> mp;

string guess_sequence(int N) {
  string p="";
  for(int i=0;i<N;i++)p.push_back('A');
  mp[0]='A';
  mp[1]='B';
  mp[2]='X';
  mp[3]='Y';
  for(int i=0;i<4;i++)
  {
    for(int j=0;j<4;j++)
    {
      for(int k=0;k<4;k++)
      {
        p[0]=mp[i];p[1]=mp[j];p[2]=mp[k];
        if(press(p)==N)return p;
      }
    }
  }
}

Compilation message

combo.cpp: In function 'std::string guess_sequence(int)':
combo.cpp:27:1: warning: control reaches end of non-void function [-Wreturn-type]
   27 | }
      | ^
# Verdict Execution time Memory Grader output
1 Correct 1 ms 200 KB Output is correct
2 Correct 2 ms 280 KB Output is correct
3 Correct 2 ms 200 KB Output is correct
4 Correct 2 ms 200 KB Output is correct
5 Correct 2 ms 200 KB Output is correct
6 Correct 1 ms 200 KB Output is correct
7 Correct 2 ms 200 KB Output is correct
8 Correct 2 ms 200 KB Output is correct
9 Correct 2 ms 200 KB Output is correct
10 Correct 2 ms 200 KB Output is correct
11 Correct 2 ms 200 KB Output is correct
12 Correct 3 ms 200 KB Output is correct
13 Correct 2 ms 200 KB Output is correct
14 Correct 3 ms 200 KB Output is correct
15 Correct 2 ms 200 KB Output is correct
16 Correct 2 ms 200 KB Output is correct
17 Correct 2 ms 200 KB Output is correct
18 Correct 3 ms 200 KB Output is correct
19 Correct 3 ms 200 KB Output is correct
20 Correct 3 ms 200 KB Output is correct
21 Correct 1 ms 200 KB Output is correct
22 Correct 1 ms 200 KB Output is correct
23 Correct 2 ms 200 KB Output is correct
24 Correct 1 ms 200 KB Output is correct
25 Correct 1 ms 200 KB Output is correct
26 Correct 2 ms 200 KB Output is correct
27 Correct 2 ms 200 KB Output is correct
28 Correct 2 ms 200 KB Output is correct
29 Correct 2 ms 200 KB Output is correct
30 Correct 5 ms 200 KB Output is correct
31 Correct 2 ms 200 KB Output is correct
32 Correct 2 ms 200 KB Output is correct
33 Correct 3 ms 200 KB Output is correct
34 Correct 3 ms 200 KB Output is correct
35 Correct 3 ms 200 KB Output is correct
36 Correct 3 ms 200 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 200 KB Wrong Answer: wrong guess.
2 Halted 0 ms 0 KB -