QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#801930 | #8592. Toxic Gene 2 | hcywoi | 100 ✓ | 2ms | 4168kb | C++23 | 3.3kb | 2024-12-07 10:47:28 | 2024-12-07 10:47:28 |
Judging History
answer
#include "toxic.h"
#include <bits/stdc++.h>
void determine_type(int n) {
int x, s;
std::vector<char> ans(1000, 'R');
{
std::vector<int> p(1000);
for (int i = 1; i < 500; i++) {
p[i + 500] = i;
}
auto a = query_machine(p);
if (a.back() < 1000) {
if (a.back() > 500) {
x = 0;
} else {
x = a.size() - 500;
}
s = 0;
} else {
for (int i = 1; i < 500; i++) {
p[i + 500] = i + 499;
}
auto b = query_machine(p);
if (b.back() == 1000) {
if (query_machine({0, 999, 999}).back() == 1) {
for (int i = 0; i < 999; i++) {
ans[i] = 'T';
}
} else {
ans[999] = 'T';
}
s = 1000;
} else {
if (b.back() > 500) {
x = 0;
for (int i = 0; i < 500; i++) {
ans[i] = 'T';
}
} else {
x = b.size() - 1;
}
s = 500;
}
}
}
std::vector<std::array<int, 2>> pr;
for (int i = 0; i < 20; i++) {
for (int j = 0; j <= 5; j++) {
if ((i * 2 + 3) * (1 << j) <= 36) {
pr.push_back({i, j});
}
}
}
for (int i = s; i < 1000; i += 50) {
std::vector<int> a(50);
for (int j = 0; j < 50; j++) {
a[j] = std::min(999, i + j);
}
std::vector<int> qry;
for (int j = 0; j < 19; j++) {
qry.push_back(a[48]);
}
for (int j = 0; j < 18; j++) {
qry.push_back(x);
for (int k = 0; k < j * 2 + 1; k++) {
qry.push_back(a[j]);
}
}
for (int j = 0; j < 30; j++) {
auto [w, h] = pr[j];
for (int A = 0; A < 1 << h; A++) {
qry.push_back(x);
for (int B = 0; B < w * 2 + 2; B++) {
qry.push_back(a[j + 18]);
}
}
}
qry.push_back(x);
for (int j = 0; j < 20; j++) {
qry.push_back(a[49]);
}
auto t = query_machine(qry);
int reg = 0;
if (t.size() == 19) {
ans[a[49]] = 'T';
reg = 1;
} else if (t.size() == 20) {
if (t[17] - t[18] == 1) {
ans[a[48]] = 'T';
reg = 1;
} else {
reg = 2;
}
} else {
ans[a[48]] = ans[a[49]] = 'T';
}
int par = 1;
for (int j = 0; j < 18; j++) {
if (j < t.size()) {
if ((par - t[j] + reg) % 2 == 0) {
ans[a[j]] = 'T';
}
par = t[j] % 2;
} else {
ans[a[j]] = 'T';
}
}
for (int j = 16; j >= 0; j--) {
if (j >= t.size()) {
for (int k = 0; k < 30; k++) {
if (pr[k][0] == j) {
ans[a[k + 18]] = 'T';
}
}
} else {
int T = (j == 0 ? qry.size() : t[j - 1]) - t[j];
T -= reg;
if (ans[a[j]] == 'R') {
T--;
}
for (int k = j + 1; k < 18; k++) {
if (ans[a[k]] == 'R') {
T -= 2;
}
}
for (int k = 0; k < 30; k++) {
if (ans[a[k + 18]] == 'R' && pr[k][0] > j) {
T -= 1 << pr[k][1] + 1;
}
}
for (int k = 0; k < 30; k++) {
if (pr[k][0] == j && !(T >> pr[k][1] + 1 & 1)) {
ans[a[k + 18]] = 'T';
}
}
}
}
}
answer_type(ans);
}
詳細信息
Subtask #1:
score: 10
Accepted
Test #1:
score: 10
Accepted
time: 1ms
memory: 3804kb
input:
2 1000 TTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTRTTTTTTTTTTTTTTTTTTTTRTTRTTTTTTTTTTTTRTTTTRTTTTTTTTTTTTTTTTTRTTTTRTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #2:
score: 10
Accepted
time: 1ms
memory: 4096kb
input:
2 1000 TTTTRRRTTTTTTTTTTTTTTTTRRRRRTTTTTTTTTRTTRTRRTRRTTTTTTRTRRRTRTRTTRTTTTTRTTTRTTTTRRRTTRTRTRTTTTRRRTRTTTTTTTTTTRRRRTTTRRTTRTRTTTTTTRTTTTTRTTTRTRTTRRTRRRTTTRTRTTTTTRTTTTTRTTTTTTTRTTTTTTTTTTTTRTTTTTTTRTRTTTTTTRRRTTTTTTTTTTTRTRTRTRRTTRRTTRTTRTTTTTTTTRRTTTTRRTTTTTTTTTRTTRTTTTTRTRTTRRTRTTTRTTRRTTRTRT...
result:
ok Correct. #(queries) = 21
Test #3:
score: 10
Accepted
time: 0ms
memory: 4096kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTRTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTTTTTTTTTTTTTTRTTTRTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #4:
score: 10
Accepted
time: 1ms
memory: 3804kb
input:
2 1000 TTRTRTTTTTTTTTTTTTTTTTTTTTTRRTTTTTRTTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTRTTRTTRTTRRTTTRTTTTTRTRTTTRTTTTTTTTTTTTTTRTTRRTTTTTTTTTTRTTTTRTTTRTTTTTTTTTTTTTTTTTRTTTTRRTTTTRRTTTRTTTTTRTTTTTTTTTTTTRTTRTRTTTTTTRTRTRTRRRRRTRRRTTRTTTRTTTTTTRTTTTRTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTRTTTTTRTTTTTTTTTTTTTTTTR...
result:
ok Correct. #(queries) = 21
Test #5:
score: 10
Accepted
time: 1ms
memory: 4168kb
input:
2 1000 TTRTRTTTRTTRTTTTRRRTTRRTTTTRTRRTRTTTTTTTTTRTTTTTTTTTTTRRTTRTTTTTTTTTTTTTRTTTRTTTTTTTTRTTTTTTRTTTTTRTTTTTTRTRRRTTTTTRTTTTTTRRTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTRTTTTTTRTTRTRRRRTTTTRTTRTTRTTTRTTTTTRTTTRTTTRTRTRTTTTTTTTTRTTTTTTRTTTTTRTTRTTTRTTTTTTTTRTTTTTTTRTRRTTTTTRTTTTTTTTRTTRTRTRTT...
result:
ok Correct. #(queries) = 21
Test #6:
score: 10
Accepted
time: 0ms
memory: 4064kb
input:
2 1000 TTTTRRTTTTTTTRTTTTTTTTTRTTTRTTTTTTTTTRTRRTTTRTTTTTTTTTTTTRTTTTTTTTRTTTTTTTTTTTRTTTTTTTRTTTTTTTTTTTTTTTTTTRTTTTTRTTTTTRTRTRTRTRRTTTRRTRTTTTTTRTRTTTTRTRRTTRTTTTTTRTTTRTTTTTTTTTTTRTTTTTTTTTTRRTTTRTRTRRRTTTTRTTRTTTTRTTTTTTTTRTRTTTTTRRTTTTTTTTTTTTRTTTTTTRTTTRTTTTTTTTRTTTTRTTTTTTTTTTTTRRRRRTRTTTTTT...
result:
ok Correct. #(queries) = 21
Test #7:
score: 10
Accepted
time: 1ms
memory: 4160kb
input:
2 1000 TRTTTRTRRTTTTTTTTRTTTTTTTRTTTTRTTRTRTTTTTRRTTTTRRTRTTRRTTTTTTRTTRTTTTTTTTTTTTRTTTRTTTTTRRTTRRTTTTTTTTRTTTTTRTTRTTTRRTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTRTTTRTTTTTTRTTRTTRTTRTTTTTTTRTTRTRTTTRTTRRTRRRTTTTRTTTTTRTTTTTTTTTTTTRTTTTTTRTRTTTTTTTRRTRRTTTTTRTTTTTTTTTRTRTTTTTRTRTTTTTRTTRTTTRTRTRTTTTTRRTTTTT...
result:
ok Correct. #(queries) = 21
Test #8:
score: 10
Accepted
time: 1ms
memory: 3804kb
input:
2 1000 TTTTTTTRTTTRTTRTRTTTTTTRTTTTTTTTTTTTTTTTRTTTTTTTRTTTTTTTTTTTTTTTTTTTRTTTTTRTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTTTTTTRTTTTTTRTTTTTTTRTTTTRTTTTTTTTTTRTTRTTTTTTTTTTTRTTTTTTTTRTTTTTTTTRTTTTTTTTTTRRTTTTTTTTTTTTRTTTTTTRRTTTTRTRTTTTTTTTTTRTTTTRTTTRTTTTTTTTTTTTRTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #9:
score: 10
Accepted
time: 1ms
memory: 3824kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #10:
score: 10
Accepted
time: 1ms
memory: 3752kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #11:
score: 10
Accepted
time: 1ms
memory: 3836kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #12:
score: 10
Accepted
time: 1ms
memory: 3856kb
input:
2 1000 TRRRRRRRRTRRRRRRRRRTTRRRRRTTRRRRRRRRRRRRTRRTTTRRRRRRRRRRRRRRRRRRRRRRRRRRTRRTRRRRTRRRRRRRRRTRRRRRRRRTRRRRRRTTRRRRRRRRRRTRRRRRTRTRRRRTRTRRRTRRRRRTRRRRTRRRRTRRRRRTRRRRRTRRRRRTRTTRTRRRRRRRRRRTRRRRTRRRRTRTRTRRRRRRTTRRTRRRRRRRTTRRRRRRRTTRRRRTRRTRTRRRRRRRRRRRTTRTTRRTRRRRRRRRRRRRTTRRRRRRRTRRRRRRTTTRR...
result:
ok Correct. #(queries) = 21
Test #13:
score: 10
Accepted
time: 0ms
memory: 3804kb
input:
2 1000 TRRTRRRTTRTRTRTRRRRRRRRRRRTTRTTRTRRRRTRRRRRRRRRRRRRRRRRRTRRRRRRRRTRRRRRTTTRRRRRRRTRRRRRRTRTRTRRRRTRTRRTRRRTTRRRTRTRRRRRRRRTRTRRRTRRRTRRRRRRTRRRTRRRRTRRRRRRRRRRTRRRRRRTRRRTTRRRRTRRRRRRRRRRRRRRRTTRRRRRRRRRTRTRTRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRTRRRRRRTTRRRTRRRTRRRRRTRRRRRRRRRRRRRRRRRRRTRRRRTRR...
result:
ok Correct. #(queries) = 21
Test #14:
score: 10
Accepted
time: 1ms
memory: 3800kb
input:
1 1000 TRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
ok Correct. #(queries) = 21
Test #15:
score: 10
Accepted
time: 1ms
memory: 4160kb
input:
1 1000 TTTTRRTRTRRTTRRTRTTTTTTTTRTRTRTRTTTTTTTTRTTTTRTTTTTRTRTRTTRTTTTTTRTTTTTRTTTTTRTTTRTTTRTTTTRTTTTTTTRRTTTTTRTTRTTTTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTRTTTTTTTTTTTTTTTRTTTTTRTTRTTRTTTTRTTTTTTTTTRTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTRTTTTTTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTT...
result:
ok Correct. #(queries) = 21
Test #16:
score: 10
Accepted
time: 1ms
memory: 3764kb
input:
1 1000 TTRTTRRTTRTTTTTTTRTTRRRRRTRTTTTRTTTTTTTTRTTRTRRTRTRRRRTRTRRTRTTRRTRTRRRTRTTTTTTTTTRTRTTRRTTTTTRTTTTTRTTRTTTTTTRTTTRTRTTRRTRTRRTRRTRRTRRTTRTTTTTRTRTTTTTRRTRTTTRRTTTTRTTTTRTTRTTRTTRTRTTRRTTTTRRTTRTTTRTTRRTTRTTRRTTTTRRTRRTTTTTTTRRTTTTTRTTRTRTRRRTRTTTRTTTTRTTTTTTRTRTTTRRTRTTTTTTRRRTTTTTTTRTRTRTRT...
result:
ok Correct. #(queries) = 21
Test #17:
score: 10
Accepted
time: 1ms
memory: 3864kb
input:
1 1000 TRRTRRRRRRTRRRRTRRRTRRRRRTTTRRRTRRRTTTTRTRRRRRTRRRRTRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRTTRTRRTRRTRRTTRTRRRTTRTRRRRRTTRTRTTRRRRRTRTTRRRRRRRRRTRRRTRRRRRRTRRTTRRTRRRRRTRRRTTRRRRRRRRRRRRTRTRRRRTRTRRRRTRRRRRRRRRTRRTRTTRTRRTRRRRRRRTTRTTRRRTRRRRRRRTRRTRTTRRRRRTTTRTTRRRRTRRRRRRTRRRRTTRRTRRRRRRTRRTRRTR...
result:
ok Correct. #(queries) = 21
Test #18:
score: 10
Accepted
time: 1ms
memory: 4092kb
input:
1 1000 TTRRTTTRTTTTTTTTTTTTTTTTTTRTTRTTRTTTRTRTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTRTTTRTTTTTTTTTRRRTTTRTRRRRTTTTTTRRTRTTTRTRTTTRTTRTTTTTTTTTTTTTRTTRTTRTTTTTTRTTRTTTTTTTTTTTTTTTTTRRRTTTTTTRTRTTTTTRRTTTTTRTTRTTTTRTTTTTTRRTTTRTTRTTTTRTTTTTTTTTTTTTTRRRTRTTRTTTRTRRTTTTTRTTTTTTTTTTRTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #19:
score: 10
Accepted
time: 1ms
memory: 4164kb
input:
2 1000 TRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
ok Correct. #(queries) = 21
Test #20:
score: 10
Accepted
time: 0ms
memory: 3856kb
input:
2 1000 TTTTRRTRTRRTTRRTRTTTTTTTTRTRTRTRTTTTTTTTRTTTTRTTTTTRTRTRTTRTTTTTTRTTTTTRTTTTTRTTTRTTTRTTTTRTTTTTTTRRTTTTTRTTRTTTTTTTTTRTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRRTTTTTTTTTRTTTTTTTTTTTTTTTRTTTTTRTTRTTRTTTTRTTTTTTTTTRTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTRTTTTTTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTT...
result:
ok Correct. #(queries) = 21
Test #21:
score: 10
Accepted
time: 1ms
memory: 3864kb
input:
2 1000 TTRTTRRTTRTTTTTTTRTTRRRRRTRTTTTRTTTTTTTTRTTRTRRTRTRRRRTRTRRTRTTRRTRTRRRTRTTTTTTTTTRTRTTRRTTTTTRTTTTTRTTRTTTTTTRTTTRTRTTRRTRTRRTRRTRRTRRTTRTTTTTRTRTTTTTRRTRTTTRRTTTTRTTTTRTTRTTRTTRTRTTRRTTTTRRTTRTTTRTTRRTTRTTRRTTTTRRTRRTTTTTTTRRTTTTTRTTRTRTRRRTRTTTRTTTTRTTTTTTRTRTTTRRTRTTTTTTRRRTTTTTTTRTRTRTRT...
result:
ok Correct. #(queries) = 21
Test #22:
score: 10
Accepted
time: 1ms
memory: 3904kb
input:
2 1000 TRRTRRRRRRTRRRRTRRRTRRRRRTTTRRRTRRRTTTTRTRRRRRTRRRRTRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRTTRTRRTRRTRRTTRTRRRTTRTRRRRRTTRTRTTRRRRRTRTTRRRRRRRRRTRRRTRRRRRRTRRTTRRTRRRRRTRRRTTRRRRRRRRRRRRTRTRRRRTRTRRRRTRRRRRRRRRTRRTRTTRTRRTRRRRRRRTTRTTRRRTRRRRRRRTRRTRTTRRRRRTTTRTTRRRRTRRRRRRTRRRRTTRRTRRRRRRTRRTRRTR...
result:
ok Correct. #(queries) = 21
Test #23:
score: 10
Accepted
time: 1ms
memory: 3864kb
input:
2 1000 TTRRTTTRTTTTTTTTTTTTTTTTTTRTTRTTRTTTRTRTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTRTRTTTRTTTTTTTTTRRRTTTRTRRRRTTTTTTRRTRTTTRTRTTTRTTRTTTTTTTTTTTTTRTTRTTRTTTTTTRTTRTTTTTTTTTTTTTTTTTRRRTTTTTTRTRTTTTTRRTTTTTRTTRTTTTRTTTTTTRRTTTRTTRTTTTRTTTTTTTTTTTTTTRRRTRTTRTTTRTRRTTTTTRTTTTTTTTTTRTTTTTTTTT...
result:
ok Correct. #(queries) = 21
Test #24:
score: 10
Accepted
time: 1ms
memory: 3860kb
input:
2 1000 TRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRT...
result:
ok Correct. #(queries) = 21
Test #25:
score: 10
Accepted
time: 1ms
memory: 3864kb
input:
2 1000 TTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRT...
result:
ok Correct. #(queries) = 21
Test #26:
score: 10
Accepted
time: 1ms
memory: 4096kb
input:
2 1000 TTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTR...
result:
ok Correct. #(queries) = 21
Test #27:
score: 10
Accepted
time: 1ms
memory: 3812kb
input:
2 1000 TTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTT...
result:
ok Correct. #(queries) = 21
Test #28:
score: 10
Accepted
time: 1ms
memory: 3788kb
input:
2 1000 TTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTT...
result:
ok Correct. #(queries) = 21
Test #29:
score: 10
Accepted
time: 1ms
memory: 3796kb
input:
2 1000 TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT...
result:
ok Correct. #(queries) = 12
Subtask #2:
score: 90
Accepted
Test #30:
score: 90
Accepted
time: 2ms
memory: 3836kb
input:
2 1000 RRTTRRRRRTTRTTRRTTTTTTTTTTTTTRTTRRRRTTRRTTRTRRTRTRTTTTTRTRTTTTTTRRTTTRTTRTTTTRTTRTTRTTRTTRTRRRTRTTTTTRRTTTTTTRRRTRRTRRRRRTTTTTTTTTRTTRTRRTTTRRRTRRRTRTRTTRTTTRTRTRTRTTTRRTTTTTTTRTRRTRTTRTTTTTRTTRTTTRRTRTRTTRTRTRTTTTRTTTTTRTTTTTRRRTRTRRTRRTTTTTRTTTRTRTTTRTRTRRTRTTTRRTRRTTTRTRTTRRTTRTTTRRTTTRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #31:
score: 90
Accepted
time: 1ms
memory: 3816kb
input:
2 1000 RTRTRRTTTRTRRRRRRTTTRTTTRRRRRRTTTRRRRRTRTRRRRRRTRTTRRRRTRRTRTTRRRRRTRRRRRRRRTRTTRRRTTTRRRRRRTTRTRTRRRRTRRRRRTRRRRRRRRRRRTRTRTTTRRTTTTRRRRTRRRTRRTRTRTRRTTRRTRRRRRRRRTRRRTRRTRRRTTRTTRRRRTRTRRRRRRRTRTTTRRTRTTTTRRRRTTRRRRRTRRRTRTTTRRRTRRRRRRRRTTTRRTTRRRRRRRRTTRRRTRRRTTRRRTTTRRRRRRRRTRRRRRTRRRRTTR...
result:
points 1.0 Correct. #(queries) = 21
Test #32:
score: 90
Accepted
time: 2ms
memory: 4088kb
input:
2 1000 RTTTRTRTRTTRRRTTRTRTRRTTTTRRRRTRRTTRRRRRTRRRTRRRTRTTRTTRTTTTRTTRRRRTRRTRRRTRTRTRTTTTRRTTRTTRRRTTRTTRRTTRTTRTRRTRTRRRRTTTTTRTRRTTTRRRRTRRTRTTRRRRTRRRRTTTRRTTRRTRTTRTRRTRTTRRRTRTTTTRTTRRTRTRTTRTTRTRRRTTTTTTTTTTTTRRRTRTTRRRTTTTTTTTTRRRTRTRTRTTTRTRRRRRTRTRRTTTTRRRRTRRRTRTTTRRRRTRTTTRTRTTRRRTRTRTT...
result:
points 1.0 Correct. #(queries) = 21
Test #33:
score: 90
Accepted
time: 1ms
memory: 3868kb
input:
2 1000 RRRRRRRRRRTRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRTRRRRRRRRRRRRRRRRRRRRRRRRTRTRRRTRRRRTRTRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRTTRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #34:
score: 90
Accepted
time: 1ms
memory: 4088kb
input:
2 1000 RRTRRTRTRRRRRRTRRRRRRRRRTRRTTTRTRRRRRRTRRRRRRRTRRRTRTTRRTRRRRRRRRRTRTTRRRRTTTRRRRRRRRRRRRRRTRRRRRTRRRRRTRRRTRRRTTTRRTRRRRRTRRRTRRRRRRRRTRRTTRRRRRRTRRTRRRTTRRRRRRTRRTRRRRRTRRRRTRRRRRRRRTRRRRRRRTTRRRRTRTTRTRRRRRRRTTRRRRTRTRRTTRRRRRRRTRRRRTRRRRRRRRRRRRRRRRRRRRRRTTRRRTRRRTRRRRTRRRRRRTTTTRRRRTRRTR...
result:
points 1.0 Correct. #(queries) = 21
Test #35:
score: 90
Accepted
time: 2ms
memory: 4092kb
input:
2 1000 RTRRTRRTRRRRRTRTTRRRTRTTRRRRRRTTRRTRTTTRTTRRRRRRRRRRTRRTTTRRTTRRRRTRRTTTRRRRTRRTRRTRTTRRRRRTRRRRTRTTRRRRRTRRRRTTRRRRRRRRTTTTRTRTTRRRRTTRRTRTTTRRTRRTRRTRTTRTRTTRRRRTRTTTTRTRRTRRRRRRRTTRRRTRTTTRTTRTTRRRTRTTTTTTRRRRRTRTRRRTTRRRTRRTTRRRRRTTTRTTRRTTRRRTRTRRRRTTRRRTTTTRTTTRRTTTRRRTTRRRRRRRTTTRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #36:
score: 90
Accepted
time: 1ms
memory: 3752kb
input:
2 1000 RRRRRRTRRRRRRRRRRRRRRTRTRRRRRRRRRTTRRRRRTTRRRTRRRRRRRRRTRRTRRRRTRTRRRTTRRRRRRRRTRRTTRTRTRTRRTRRRTRRTRRRRRTRRRRTRRRTRTRRTRRTRRRRRRRRRRTRRRRTRTRRRTTRRRRRTRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRTRRRRRRRTRRTRRRTRRTTRRRRRRRRRRRTRRRRRRRRRTTRRRRTRRTTRRTRRRRTRRRRTRTRRRRRRTRRRRRRRRRRRRRRTRRRRRTRRRTRRRRTRTRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #37:
score: 90
Accepted
time: 2ms
memory: 3864kb
input:
2 1000 RRRTTTTTRTTTTTRTTTTTTRTTTTTTTRTTRTTTTTRTRTTTTRRTTTTTTTTTTTTRTTTTTTTTTTTTTTRTTTTRTTTTRTTRTRTTTRTTTTTTTRTTTRTTTTTTTTTTTTTTTTRTTTTTRTTTTRTTTTTTRTRTRTTTTRTTTTTTTRRTRRTRTTRTTTTTTTTTRTTTTTTTTTTTRTRTTTTTTTTTTRRTTTTTTTTTTTTRTRTRTRTRTTTTRRRTTTTTTTTTRTTRTTTRTTTTRTTTTRTTTTTRTTTTTTTTTTTTRTRTTRTTTTTTRTTTR...
result:
points 1.0 Correct. #(queries) = 21
Test #38:
score: 90
Accepted
time: 1ms
memory: 3864kb
input:
2 1000 RTTTTRTTTTTTTTTTTTRTTTRTTRTRTTTRTTTTTTRTTTTTTTTTRTTTTTRRTTTTTTTTRRTRTTTTRTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTRTTTRTTTTTTTTTTTTTTTTTRTTTTTTTRRTTTTTTTTTTTTTTTTRTTTTTTTTTRTTTTTTTTTTTTTTTTRTTTTTTRTTTTTTTTTTRTTTRTTRTRTTTRTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTRTTTT...
result:
points 1.0 Correct. #(queries) = 21
Test #39:
score: 90
Accepted
time: 1ms
memory: 3812kb
input:
2 1000 RRRRRRRTTTTRRRRRTRRRTRRRRRRTRRRTRRRRRRRRRRRRRRRRRRTRRRRRRRTRTRRRRRRRRRRTRRRTRRRRRRTRRRRRRRRRTRRRRRRTRRRRTRRRTRRRRRTTRRRTRRRTTTRRRRRRRRRTRTRRRRRRRRRRRRRRRRRTRRRRRRTTRRRTRRRRRRRRTRTRTRRRRRRTRRRTRTRRRTRRRRRRTRRTRRRTRTRRRRRRRRTRRRTRTRRRRRTRRRRRRRRTRTRTRRRRTRRRTRRRRRTRRRRTTRRRRRRRRRRRRTRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #40:
score: 90
Accepted
time: 0ms
memory: 3820kb
input:
2 1000 RRRRTRTRRRRRTRRRRRRRRTRTRRRRTRTRRRRRTRTRRRRRRRRTRRRRRRRRTRRRTRRRRTRRRRRRRRRRRRRTRRRRTRTRRRTRRRRRRRRRRRTRRRRRRTTRTTRTTRTRRRTTRTRRRRRRTRRRRRTRRRRRRTTRRTRRRRRRRRRTRRRRTRRRRTTRRRTRRRRRTRRRRRTRTRRRRRRTRRRRTRRRRRRRTRRRRRTRRTRTRTRRRRTTTRTRRRRRRTRRRTTRRRRRRRTRRRTRTRRRRRRRTRRRRTRRRRRRRRTRRRRRTRRRRTRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #41:
score: 90
Accepted
time: 1ms
memory: 3808kb
input:
2 1000 RRRRRRRRRRRRRTRRRTRTRRRRRRTRRRRRRRTRRRRRRRRRRRTRRRRRTRRTRTRRRRRRTRRRTRRRRRRRRRRRRRRTRRRRRTRTRRRRTRRRRRTTRRRTRRRRRRRRRTRRRTRTRRRRRRTRRTRRRTRRRTRRRRRRTRRRRRRRTRRRTTRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRRRRRRRRRRTRRTRRRTTRTRRRRRRRRRRTRRRTTRRRRRTTTTRRRTRRRRTTRRTTRRRRRRTTTTRTRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #42:
score: 90
Accepted
time: 0ms
memory: 4040kb
input:
2 1000 RRTRRRRRRTRRTRRRTRRRRRTRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRTRTRRRRRRRRRTRRRRRRTRRRTRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRTTRRRRRRRTTRRRRRRRRTTRRRRTRTRRRRRRRRRRRRRRRRRRTRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRTTRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRT...
result:
points 1.0 Correct. #(queries) = 21
Test #43:
score: 90
Accepted
time: 1ms
memory: 3808kb
input:
2 1000 RRRRRTRRRRRRRRRTRTRRRRRRRRRRRRRRRRRRRTRRRTRRTRRRRRRRRRRRTRRRTTRRRRRRRRRRRRRRRRTRRRRRRRRRTRRRRRRRRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRTTTRTTRTRRTTRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRTRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRTRRRTRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRTRTRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTRTR...
result:
points 1.0 Correct. #(queries) = 21
Test #44:
score: 90
Accepted
time: 0ms
memory: 3788kb
input:
2 1000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #45:
score: 90
Accepted
time: 1ms
memory: 3816kb
input:
2 1000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRTRRRRTRRRRRRRRRRRRRRRTRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #46:
score: 90
Accepted
time: 2ms
memory: 3820kb
input:
2 1000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 12
Test #47:
score: 90
Accepted
time: 0ms
memory: 3796kb
input:
2 1000 RTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTRTR...
result:
points 1.0 Correct. #(queries) = 21
Test #48:
score: 90
Accepted
time: 1ms
memory: 3816kb
input:
2 1000 RRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTRRTTR...
result:
points 1.0 Correct. #(queries) = 21
Test #49:
score: 90
Accepted
time: 1ms
memory: 3808kb
input:
2 1000 RRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRTTTTRRRRT...
result:
points 1.0 Correct. #(queries) = 21
Test #50:
score: 90
Accepted
time: 1ms
memory: 3800kb
input:
2 1000 RRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRRRRRTTTTTTTTRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #51:
score: 90
Accepted
time: 1ms
memory: 4068kb
input:
2 1000 RRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTRRRRR...
result:
points 1.0 Correct. #(queries) = 21
Test #52:
score: 90
Accepted
time: 0ms
memory: 3860kb
input:
2 1000 RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR...
result:
points 1.0 Correct. #(queries) = 12