Submission #831638

# Submission time Handle Problem Language Result Execution time Memory
831638 2023-08-20T11:41:13 Z KemalK Martian DNA (IOI16_dna) C++17
0 / 100
1 ms 212 KB
#include "dna.h"
#include <bits/stdc++.h>
#include <cstdlib>
using namespace std;

std::string analyse(int n, int t) {
    string ans = "";
    if (n <= 5){
        cout << "first" << "\n";
        bool ok = false;
        for (int mask = 0; mask < (1<<n) - 1; mask++){
            string cur = "";
            for (int j = 0; j < n; j++){
                if (mask>>j&1){
                    cur += "1";
                }
                else{
                    cur += "0";
                }
            }
            ok = make_test(cur);
            if (ok){
                return cur;
            }
        }
        if (!ok){
            for(int i = 0; i < n; i++){
                ans += "1";
            }
            return ans;
        }
    }
    else if (n <= 100 and n > 5){
        while (1){
            if (make_test(ans + "0")){
                ans += '0';
            }
            else if (make_test(ans + "1")){
                ans += '1';
            }
            else{
                break;
            }
        }
        while(1){
            if (make_test("1" + ans)){
                ans = '1' + ans;
            }
            else if (make_test("0" + ans)){
                ans = '0' + ans;
            }
            else{
                break;
            }
        }
        return ans;
    }
    return ans;
}                       

Compilation message

grader.cpp: In function 'bool make_test(std::string)':
grader.cpp:14:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   14 |  for (int i = 0; i < p.size(); i++) {
      |                  ~~^~~~~~~~~~
grader.cpp:23:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   23 |  for (int i = 1; i <= ss.size(); i++) {
      |                  ~~^~~~~~~~~~~~
grader.cpp:28:13: warning: comparison of integer expressions of different signedness: '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'} and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   28 |   if (pr[i] == p.size()) {
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Secret is incorrect!
2 Incorrect 0 ms 212 KB Secret is incorrect!
3 Incorrect 0 ms 212 KB Secret is incorrect!
4 Incorrect 0 ms 212 KB Secret is incorrect!
5 Incorrect 0 ms 212 KB Secret is incorrect!
6 Incorrect 0 ms 212 KB Secret is incorrect!
7 Incorrect 0 ms 212 KB Secret is incorrect!
8 Incorrect 0 ms 212 KB Secret is incorrect!
9 Incorrect 0 ms 212 KB Secret is incorrect!
10 Incorrect 0 ms 212 KB Secret is incorrect!
11 Incorrect 0 ms 212 KB Secret is incorrect!
12 Incorrect 0 ms 212 KB Secret is incorrect!
13 Incorrect 0 ms 212 KB Secret is incorrect!
14 Incorrect 0 ms 212 KB Secret is incorrect!
15 Incorrect 0 ms 212 KB Secret is incorrect!
16 Incorrect 0 ms 212 KB Secret is incorrect!
17 Incorrect 0 ms 212 KB Secret is incorrect!
18 Incorrect 0 ms 212 KB Secret is incorrect!
19 Incorrect 0 ms 212 KB Secret is incorrect!
20 Incorrect 0 ms 212 KB Secret is incorrect!
21 Incorrect 0 ms 212 KB Secret is incorrect!
22 Incorrect 1 ms 212 KB Secret is incorrect!
23 Incorrect 0 ms 212 KB Secret is incorrect!
24 Incorrect 0 ms 212 KB Secret is incorrect!
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Secret is incorrect!
2 Incorrect 0 ms 212 KB Secret is incorrect!
3 Incorrect 0 ms 212 KB Secret is incorrect!
4 Incorrect 0 ms 212 KB Secret is incorrect!
5 Incorrect 0 ms 212 KB Secret is incorrect!
6 Incorrect 0 ms 212 KB Secret is incorrect!
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 0 ms 212 KB Output is correct
22 Correct 0 ms 212 KB Output is correct
23 Correct 0 ms 212 KB Output is correct
24 Correct 0 ms 212 KB Output is correct
25 Correct 0 ms 212 KB Output is correct
26 Correct 0 ms 212 KB Output is correct
27 Correct 0 ms 212 KB Output is correct
28 Correct 1 ms 212 KB Output is correct
29 Correct 0 ms 212 KB Output is correct
30 Correct 0 ms 212 KB Output is correct
31 Correct 0 ms 212 KB Output is correct
32 Correct 0 ms 212 KB Output is correct
33 Correct 0 ms 212 KB Output is correct
34 Correct 0 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Secret is incorrect!
2 Incorrect 0 ms 212 KB Secret is incorrect!
3 Incorrect 0 ms 212 KB Secret is incorrect!
4 Incorrect 0 ms 212 KB Secret is incorrect!
5 Incorrect 0 ms 212 KB Secret is incorrect!
6 Incorrect 0 ms 212 KB Secret is incorrect!
7 Correct 0 ms 212 KB Output is correct
8 Correct 0 ms 212 KB Output is correct
9 Correct 0 ms 212 KB Output is correct
10 Correct 0 ms 212 KB Output is correct
11 Correct 0 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 0 ms 212 KB Output is correct
14 Correct 0 ms 212 KB Output is correct
15 Correct 0 ms 212 KB Output is correct
16 Correct 0 ms 212 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 0 ms 212 KB Output is correct
19 Correct 1 ms 212 KB Output is correct
20 Correct 0 ms 212 KB Output is correct
21 Correct 1 ms 212 KB Output is correct
22 Incorrect 0 ms 212 KB Unexpected end of file - token expected
23 Incorrect 0 ms 212 KB Unexpected end of file - token expected
24 Incorrect 1 ms 212 KB Unexpected end of file - token expected
25 Incorrect 0 ms 212 KB Unexpected end of file - token expected
26 Incorrect 0 ms 212 KB Unexpected end of file - token expected
27 Incorrect 0 ms 212 KB Unexpected end of file - token expected
28 Incorrect 0 ms 212 KB Unexpected end of file - token expected
29 Incorrect 0 ms 212 KB Unexpected end of file - token expected
30 Incorrect 0 ms 212 KB Unexpected end of file - token expected
31 Incorrect 0 ms 212 KB Unexpected end of file - token expected
32 Incorrect 0 ms 212 KB Unexpected end of file - token expected
33 Incorrect 0 ms 212 KB Unexpected end of file - token expected
34 Incorrect 0 ms 212 KB Unexpected end of file - token expected
35 Incorrect 0 ms 212 KB Unexpected end of file - token expected
36 Incorrect 0 ms 212 KB Unexpected end of file - token expected
37 Incorrect 0 ms 212 KB Unexpected end of file - token expected
38 Incorrect 0 ms 212 KB Unexpected end of file - token expected
39 Incorrect 0 ms 212 KB Unexpected end of file - token expected