# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
228296 | Ruxandra985 | Snake Escaping (JOI18_snake_escaping) | C++14 | 2086 ms | 26104 KiB |
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 <bits/stdc++.h>
#define DIMN 2000000
using namespace std;
int sol , nr;
int n;
char s[30];
char v[2000000];
int bits[DIMN] , dp0[DIMN] , dp1[DIMN];
void solve_brut (int poz){
if (poz == n + 1){
sol += v[nr] - '0';
return;
}
if (s[poz] != '?'){
nr = nr * 2 + (s[poz] - '0');
solve_brut (poz + 1);
nr /= 2;
}
else {
nr = nr * 2;
solve_brut(poz + 1); /// pui 0
nr++;
solve_brut(poz + 1); /// pui 1
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |