QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#721078 | #8644. Tricolor Lights | hhoppitree | 0 | 25ms | 4556kb | C++17 | 2.2kb | 2024-11-07 15:10:49 | 2024-11-07 15:10:50 |
Judging History
Anna
#include <bits/stdc++.h>
#include "Anna.h"
using namespace std;
const int L = 30;
namespace Anna {
int v[1 << 20];
pair<string, int> anna(int n, string S) {
if (n <= L) {
string T;
for (int i = 0; i < n; ++i) {
T += (S[i] == 'R' ? 'G' : 'R');
}
return {T, n};
}
mt19937 rnd;
for (int i = 0; i < n; ++i) v[i] = rnd() % 3;
string T;
for (int i = 0; i + 1 < n; i += 2) {
int ok = 0;
for (int j = 0; j < 3 && !ok; ++j) {
for (int k = 0; k < 3; ++k) {
if ((j + k) % 3 != v[i] || "RGB"[j] == S[i] || "RGB"[k] == S[i + 1]) {
continue;
}
T += "RGB"[j];
T += "RGB"[k];
ok = 1;
break;
}
}
}
if (n & 1) {
T += (S.back() == 'R' ? 'G' : 'R');
}
return {T, 2 * L};
}
}
pair<string, int> anna(int n, string S) {
return Anna::anna(n, S);
}
Bruno
#include <bits/stdc++.h>
#include "Bruno.h"
using namespace std;
const int L = 30;
namespace Bruno {
int n, m, v[1 << 20];
map<string, int> M;
void init(int _n, int _m) {
n = _n, m = _m;
mt19937 rnd;
for (int i = 0; i < n; ++i) v[i] = rnd() % 3;
for (int i = 0; i < n; i += 2) {
string o;
for (int j = 0; j < 2 * L; ++j) {
o += "012"[v[i + j * 2]];
if (j == 2 * L - 2 || j == 2 * L - 1) M[o] = i + 1;
}
}
}
int tr(char c) {
return (c == 'R' ? 0 : (c == 'G' ? 1 : 2));
}
int bruno(string s) {
if (n == m) return 1;
for (int i = 0; i < 2; ++i) {
string T;
for (int j = i; j + 1 < m; j += 2) {
T += "012"[(tr(s[j]) + tr(s[j + 1])) % 3];
}
if (M.count(T)) return M[T] - i;
}
return -1;
}
}
void init(int n, int l) {
Bruno::init(n, l);
}
int bruno(string s) {
return Bruno::bruno(s);
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 5
Accepted
time: 23ms
memory: 4552kb
Manager to Aoi
Start Success 8 RGGBRBBG
Aoi to Manager
Start 0 0 GRRRGRRR 8
Manager to Bitaro
Start Success 10000 8 8 GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRR...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #2:
score: 5
Accepted
time: 10ms
memory: 4552kb
Manager to Aoi
Start Success 1 G
Aoi to Manager
Start 0 0 R 1
Manager to Bitaro
Start Success 10000 1 1 R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Succ...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #3:
score: 5
Accepted
time: 17ms
memory: 4268kb
Manager to Aoi
Start Success 2 BB
Aoi to Manager
Start 0 0 RR 2
Manager to Bitaro
Start Success 10000 2 2 RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success R...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #4:
score: 5
Accepted
time: 16ms
memory: 4292kb
Manager to Aoi
Start Success 28 RRRRRRRRRRRRRRRRRRRRRRRRRRRR
Aoi to Manager
Start 0 0 GGGGGGGGGGGGGGGGGGGGGGGGGGGG 28
Manager to Bitaro
Start Success 10000 28 28 GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGG...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #5:
score: 5
Accepted
time: 6ms
memory: 4524kb
Manager to Aoi
Start Success 60 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
Aoi to Manager
Start 0 0 GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG 60
Manager to Bitaro
Start Success 10000 60 60 GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG Success GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG Success GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG Success GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG Succes...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #6:
score: 0
Wrong Answer
time: 1ms
memory: 4268kb
Manager to Aoi
Start Success 130 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Aoi to Manager
Start 0 0 GGGGBBGGGBBBGBGGGBBBGGGGGBBBBBGBBBGBBBBBGBGGGGGBBBBBGGGBBBBBBBBBGBBBGBGGGBGBGGBBGGBBGGBBGBGGBBGBBBBBGGBBGBGGGGBBGGBBGBBBGBGGGBBBGG 60
Manager to Bitaro
Start Success 10000 130 60 BBBBBGBBBGBGGGBGBGGBBGGBBGGBBGBGGBBGBBBBBGGBBGBGGGGBBGGBBGBB WA
Bitaro to Manager
Start 0 0 -1
Manager to Checker
0.00
result:
points 0.0
Subtask #2:
score: 0
Skipped
Subtask #3:
score: 0
Skipped
Subtask #4:
score: 0
Skipped
Subtask #5:
score: 0
Wrong Answer
Test #80:
score: 70
Accepted
time: 25ms
memory: 4268kb
Manager to Aoi
Start Success 8 RGGBRBBG
Aoi to Manager
Start 0 0 GRRRGRRR 8
Manager to Bitaro
Start Success 10000 8 8 GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRRGRRR Success GRRR...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #81:
score: 70
Accepted
time: 13ms
memory: 4268kb
Manager to Aoi
Start Success 1 G
Aoi to Manager
Start 0 0 R 1
Manager to Bitaro
Start Success 10000 1 1 R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Success R Succ...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #82:
score: 70
Accepted
time: 13ms
memory: 4272kb
Manager to Aoi
Start Success 2 BB
Aoi to Manager
Start 0 0 RR 2
Manager to Bitaro
Start Success 10000 2 2 RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success RR Success R...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #83:
score: 70
Accepted
time: 13ms
memory: 4552kb
Manager to Aoi
Start Success 28 RRRRRRRRRRRRRRRRRRRRRRRRRRRR
Aoi to Manager
Start 0 0 GGGGGGGGGGGGGGGGGGGGGGGGGGGG 28
Manager to Bitaro
Start Success 10000 28 28 GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGGGGGGGGGGGGGGG Success GGGGGGGGGGGGGGG...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
1.000000000000000
result:
points 1.0
Test #84:
score: 20
Acceptable Answer
time: 23ms
memory: 4224kb
Manager to Aoi
Start Success 60 BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
Aoi to Manager
Start 0 0 GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG 60
Manager to Bitaro
Start Success 10000 60 60 GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG Success GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG Success GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG Success GGGGRGGGRRRGRRGGRRRGGGGGRRRGRGRRRGRRRGRGRRGGGGRRRGRGGGRRRGRG Succes...
Bitaro to Manager
Start 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 ...
Manager to Checker
0.285714285714286
result:
points 0.28571428570
Test #85:
score: 0
Wrong Answer
time: 1ms
memory: 4556kb
Manager to Aoi
Start Success 130 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
Aoi to Manager
Start 0 0 GGGGBBGGGBBBGBGGGBBBGGGGGBBBBBGBBBGBBBBBGBGGGGGBBBBBGGGBBBBBBBBBGBBBGBGGGBGBGGBBGGBBGGBBGBGGBBGBBBBBGGBBGBGGGGBBGGBBGBBBGBGGGBBBGG 60
Manager to Bitaro
Start Success 10000 130 60 BBBGBGGGBBBGGGGGBBBBBGBBBGBBBBBGBGGGGGBBBBBGGGBBBBBBBBBGBBBG WA
Bitaro to Manager
Start 0 0 -1
Manager to Checker
0.00
result:
points 0.0