#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
unordered_map<int,int> um;
int cnt;
void brute(int lvl, int cur, int prev){
if(lvl>=40){
um[cur]=cnt;
cnt++;
return;
}
if(prev==0){
brute(lvl+1,cur,0);
brute(lvl+2,1<<lvl|cur,0);
}
else brute(lvl+1,cur,0);
}
void Anna(int N, vector<char> S){
brute(0,0,0);
}
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
unordered_map<int,int> um;
int cnt;
void brute(int lvl, int cur, int prev){
if(lvl>=40){
um[cur]=cnt;
cnt++;
return;
}
if(prev==0){
brute(lvl+1,cur,0);
brute(lvl+2,1<<lvl|cur,0);
}
else brute(lvl+1,cur,0);
}
void Bruno(int N, int L, std::vector<int> b) {
brute(0,0,0);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1404 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Runtime error |
1359 ms |
262144 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |