Submission #33850

#TimeUsernameProblemLanguageResultExecution timeMemory
33850nickyrioMartian DNA (IOI16_dna)C++14
0 / 100
1000 ms318464 KiB
#include "dna.h" #include <bits/stdc++.h> using namespace std; string solve2(string p, int n) { if ((int)p.size() == n) return p; if (make_test(p + "0")){ return solve2(p + "0", n); } return solve2(p + "1", n); } string solve(string p, int n) { bool a0 = make_test("0" + p); if (a0) return solve("0" + p, n); bool a1 = make_test("1" + p); if (a1) return solve("1" + p, n); return solve2(p, n); } string analyse(int n, int t) { if (make_test("00")) { return solve("00", n); } if (make_test("01")) { return solve("01", n); } if (make_test("10")) { return solve("10", n); } return solve("11", n); }

Compilation message (stderr)

grader.cpp: In function 'bool make_test(std::__cxx11::string)':
grader.cpp:14:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < p.size(); i++) {
                    ^
grader.cpp:23:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 1; i <= ss.size(); i++) {
                    ^
grader.cpp:28:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (pr[i] == p.size()) {
             ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...