Submission #127320

#TimeUsernameProblemLanguageResultExecution timeMemory
127320Osama_AlkhodairyMartian DNA (IOI16_dna)C++17
36 / 100
25 ms420 KiB
#include <bits/stdc++.h> #include "dna.h" //~ #include "grader.cpp" using namespace std; std::string analyse(int n, int t) { string ret; while(1){ string cur = ret; cur += '0'; if(make_test(cur)) ret += '0'; else{ cur.pop_back(); cur += '1'; if(make_test(cur)) ret += '1'; else break; } } while(1){ string cur = ret; cur = '0' + cur; if(make_test(cur)) ret = '0' + ret; else{ cur[0] = '1'; if(make_test(cur)) ret = '1' + ret; else break; } } return ret; }

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...