//
// Created by liasa on 06/02/2026.
//
#include "Anna.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define v vector
#define lp(i,s,e)for(ll i =s ;i<e;++i)
pair<string, int> anna(int N, string S) {
mt19937 rng(1337);
string r = "";
lp(i,0,N) {
if(rng() % 2) r += '1';
else r += '0';
}
string t = "";
lp(i,0,N) {
char f = S[i];
char c1, c2;
if(f == 'R') { c1 = 'G'; c2 = 'B'; }
else if(f == 'G') { c1 = 'R'; c2 = 'B'; }
else { c1 = 'R'; c2 = 'G'; }
if(r[i] == '0') t += c1;
else t += c2;
}
int l = 28;
if(N < 28) l = N;
return {t, l};
}
//
// Created by liasa on 06/02/2026.
//
#include "Bruno.h"
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define v vector
#define lp(i,s,e)for(ll i =s ;i<e;++i)
const int MAXN = 500005;
bitset<MAXN> z, o, c;
void init(int N, int l) {
mt19937 rng(1337);
lp(i,0,N) {
if(rng() % 2 == 0) z.set(i);
else o.set(i);
}
}
int bruno(string u) {
ll l = u.length();
c.set();
lp(i,0,l) {
if(u[i] == 'R') c &= (z >> i);
else if(u[i] == 'B') c &= (o >> i);
}
int ans = c._Find_first();
return ans + 1;
}
| # | 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... |