QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#255385 | #2513. A Color Game | tpc_icpc_n# | AC ✓ | 321ms | 21496kb | C++20 | 1.5kb | 2023-11-18 15:43:31 | 2023-11-18 15:43:34 |
Judging History
answer
#include <iostream>
#include <vector>
#include <set>
#include <unordered_set>
#include <algorithm>
#include <ranges>
#define rep(i,n) for(int i=0;i<(n);i++)
using namespace std;
using i64 = long long;
int main() {
int N;
std::vector<int> A;
{
std::string S;
std::cin >> S;
std::unordered_map<char, int> mp;
std::string X = "RGBCMYK";
for(int i = 0; i < 7; i++) {
mp[X[i]] = i;
}
N = S.size();
A.resize(S.size());
for(int i = 0; i < S.size(); i++) {
A[i] = mp[S[i]];
}
}
int M;
std::cin >> M;
const int INF = 1e9;
std::vector dp(std::vector(N + 1, std::vector(N + 1, std::vector(8, -INF))));
if(M == 1) {
std::cout << "Yes" << std::endl;
return 0;
}
for(int i = 0; i < N; i++) {
dp[i][i + 1][A[i]] = 1;
}
for(int l = 2; l <= N; l++) {
for(int i = 0; i + l <= N; i++) {
int j = i + l;
for(int k = i + 1; k < j; k++) {
for(int c = 0; c < 7; c++) {
dp[i][j][c] = std::max(dp[i][j][c], std::max(dp[i][k][c], dp[i][k][7]) + std::max(dp[k][j][c], dp[k][j][7]));
if(dp[i][j][c] >= M) {
dp[i][j][7] = 0;
}
}
}
}
}
std::cout << (dp[0][N][7] == 0 ? "Yes" : "No") << std::endl;
}
详细
Test #1:
score: 100
Accepted
time: 0ms
memory: 3528kb
input:
BBBRRRRRRGGGB 3
output:
Yes
result:
ok single line: 'Yes'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
BBBRRRRRRGGGB 4
output:
No
result:
ok single line: 'No'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3604kb
input:
RRRRGGGRRRRRG 3
output:
Yes
result:
ok single line: 'Yes'
Test #4:
score: 0
Accepted
time: 5ms
memory: 9868kb
input:
GMYCGMRMGYMRMKCBKBMKKBMMKBBKMBMRRMGYKKMBKMYRGGBMRMKKKBRCMKYCCKYGYYKKCKRCYGGKGRBCKMYMRCRGBRRYCCKKRRKRCKMMMGCCGYYKMCRGMKCYBMRRKYYRRKGGRBMCKGBBYYGGGBBYBBRCCMGKKGRGRMRRBRCYGGGKBRKCBYCKMMBRCGKCCYYMMCKGRBYRRGBBCGYKBBMKRBBKGCRBYCKMYKMCKMBRMGGYBKBRBMYGGCKYCMYKBRCCGCYRRRKCKCBKCMCYBKRBKMCCYRBKBGGMGMCBGMBMYCCK 1
output:
Yes
result:
ok single line: 'Yes'
Test #5:
score: 0
Accepted
time: 63ms
memory: 9924kb
input:
KKCCCCCKYYYYYYKKKCRRCCBBBGGMMGCKKBBBBBRCCRRCRRYYCCYYBGGGBKKKBKKKCMKKMCCCGGGCCCCBBBCCKMMMKCCYYBBCCCCCCCCCYYCCCCBMMBRRRBBGGMKKBYMMMYYBBBBYYYYKCCCMMCKKMMMKKGGMBBRRBBBBKKBBBMMMMKKMMMKKKMMYYGMYYYMRRBMMMBGRRGGMMCCGRRBBBGCGGGCBBBCCBGGGGCRKKBBBRRYYYBBBYYKKKYYYBBYYBBBBCCCRKYGGGYYKKKKKKKKKRCCCYKKRRRKKMMMKMMC 2
output:
Yes
result:
ok single line: 'Yes'
Test #6:
score: 0
Accepted
time: 60ms
memory: 9916kb
input:
BYCCCYYBMMMMMMMMGYYYBBBYGBBBGGGKKKKKKGGGKKKBBBBKKBBBYYGGGGYGGGMGGGGMCMCCCMMMYYYYYYYYYYYCCCGGGCCRRRCRRBBBBRCCCCCGYCCCCCCYYCCCGGMGGRRRBCCCBMMMMBRCCCCGYYYGRYYYRRMMMMMRRRRMCBBGGGBBGYYYGGGCCGGGGMMBBGGRRRRGBRRRRYYYYBCCCYCCKKKMMMMCCYGGGYCBBBYYYYCCCCYCCCMMMMYYCBBBBBBBCCCCCGGGGCCCGGGGCCBBBBBGGGGMMMBKKKKMMM 3
output:
Yes
result:
ok single line: 'Yes'
Test #7:
score: 0
Accepted
time: 55ms
memory: 9792kb
input:
RMMMRRRRRRMMMMMMMMMMMMMGGGGBBBBMYYYRRRRRRYYMMGGGGMMMYMMRRRKKKKYYYYYYMMMMMMRRRRRKRKKRKKKKRRRKYYYKKKKYKCCCMMKKKKKMMMCKRRRKKKKRRRRRMMMGGGGGGMMMRCCCCYYYYCCCBBBBCCYCCCCCYYYYRRYYYYRRRRRRRRRRRRRBBBKKKKBRRRRBRRRBBBBBGGGGGGBYGGGGGGYKRBBBBBBRRRCCCCCCCCCRRRRRRRRKCCCCKYYYYKKKMMMMKKKBBMMMMBBBBBBBBKKKKKKRRRR 4
output:
Yes
result:
ok single line: 'Yes'
Test #8:
score: 0
Accepted
time: 51ms
memory: 9728kb
input:
BBKKKKKBBBCCCKKKKKKKKKKKKKCCKGGGGGGGCCCCCCMMMMMMMRRRRRRRRRYYKKKKKKYYYRRRRRKKKKKCBBBBBBBBBBRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBGGGGGGBBBRRRRMMMMMRMMYYYYYYBBBBMMMMMBBYMMMKGGGGGGGKKKKMGGRRRRRRGGGGRRRRRRRYYYKKKBBBBBBKKKCCCCCCKBBBBBBYBBBBBBBBBBBBBBYYBBBBBBBBBBBYYCCCCCYBBBBBBYRRRRRRYMMMMMMGGGGGGGMMMMMYY 5
output:
Yes
result:
ok single line: 'Yes'
Test #9:
score: 0
Accepted
time: 61ms
memory: 9936kb
input:
BBMMCCCCCCCCCMMMMKKKKKKMMMBCCYMMMMMCYYYYYYYCCCCCMMMMMMMYYYYMMMMCCCYYYYYYYYYCCCCMMMMMMMMCCMMMYCCCCCBBBBBBBBBRRRRRRRRBMMMMMMMGGGGGGGGGGGGGGGGGMMMMMMMMMMGGGGBBBBBBBCCCCCCBBGGCCCCCCMMMCCCCCCCCKKKKKKKCMMMBBCMMMMMMMMCCCBBBKKKKGGGGGGKKKKKBBBBCCCCMMMMMMRRRRRRGGGGRRRRRRRGKKKKKKKKKKKKKKKKKKKKKKMMMMMMMMKKGGGG 6
output:
Yes
result:
ok single line: 'Yes'
Test #10:
score: 0
Accepted
time: 49ms
memory: 9704kb
input:
GGGGGGGGGGGGGGGGRRRRRRRRCCCCYMMMMMMMMCCCCCCCCCCMMMMMMMMMMMMMYYMMMMBBBBBBBBMMMMMYMGGGGGGGGGGGGGGGGGGGGGMMMMMMMMMMMMBBBBBGGGGGGGGGGBBBBBBMMMMKKKKKRRRRRRRRRRRKKKKMMMMMMMYYYYYYYYYYKKKKKKKKKYYYYYBBCKKKGGGGGGGGGGGGKKKKKCCCCMMMMMMMMMMCCCCCBMMMMMMMMMMMBBBBBBBYMMMMMMMMMMMMYYYYYYYYYYYYCGGGGGGGGGGCCCCGG 8
output:
Yes
result:
ok single line: 'Yes'
Test #11:
score: 0
Accepted
time: 55ms
memory: 9444kb
input:
MMMMMMMMMMMMMCCCCCCCCCCCGGGGGGGGGGGGGGGGGGGCCCCCCCCCMMMMKKBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCMMMRRRRRRRRRBBBKKKKKKKKKKKKKKKCCCCCCCCCCCCCRRRRRRRRRRRRRRRRRRCCCCCCCCKKKKKKKMKKKKKKKKKKYYYYYYYYYYYYYYYYYYKKKKKKKKKMM 16
output:
Yes
result:
ok single line: 'Yes'
Test #12:
score: 0
Accepted
time: 57ms
memory: 9820kb
input:
GGGGMMMMMMMMMMMMMMMMMMMMMMMMMMRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYMMMMMMMMMMGGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGG 30
output:
Yes
result:
ok single line: 'Yes'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3508kb
input:
RGB 1
output:
Yes
result:
ok single line: 'Yes'
Test #14:
score: 0
Accepted
time: 2ms
memory: 4344kb
input:
BBRBBBRBRBBBRRBBRRBBRRRRBBRRBBRRBRRRRRRBRRRRBBBRBRBBBRRBBRRBBRRRRBBRRBBRRBRRRBBBRRRBRRRBB 4
output:
Yes
result:
ok single line: 'Yes'
Test #15:
score: 0
Accepted
time: 15ms
memory: 6492kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 200
output:
Yes
result:
ok single line: 'Yes'
Test #16:
score: 0
Accepted
time: 14ms
memory: 6464kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 300
output:
No
result:
ok single line: 'No'
Test #17:
score: 0
Accepted
time: 1ms
memory: 3936kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 3
output:
Yes
result:
ok single line: 'Yes'
Test #18:
score: 0
Accepted
time: 62ms
memory: 9984kb
input:
GCGRRRRRGCCBKMMBBYYYYYKRCCCMCCGCCGGGRGGBRRRBRMMMYCCYRKMRRRRRCRMMMCCCMCRRCGGCMMMKKMMCKKMCMKMCYKCCCCKBKKKKMKKKBBBBBRYKKBBGGGYYRRCBBCYYKKKKKKYMYYCKYKKCCYYYBCCCMCGMGGGRGRRKRGGKGMGKBKGGBRMMMKGKGKRRBBKKKGGRRRRGBBKKKRRRKRMMMMRGGGYGCCCCRCMKKKCGRRRGBBYMCCCMRBBCCGBBGBBRMMKKRYYYYYKKKKYYYRRYGKRMMMYYRCCCYYYCMMMR 2
output:
No
result:
ok single line: 'No'
Test #19:
score: 0
Accepted
time: 156ms
memory: 15136kb
input:
BBKKYGGGGYKKKKKCCGGCKKKMMBRRRBBBBBKKKKRRRRBYYBBBBMBBBMYCMMMMBBBCCYCCCYYYYMMCCCBBGGGRRGGGRRBMMMMRRRRMYYYYKKMCCCCMKMMMMKKMKGGCCCCBBCYYYCGGCCCCCYYYYCRRRRRRRRRRRRRRRMRYYYRRMBBBBKGGBBBBMGRRRRYBBYYYGGKKKKCCCMRYGGKGGGGKKKKKYGMMMGGBBBBBBBBGGGGGGMMMGGYBBBBRMCRRRRRYYYYBRYYYKKKKKRRYYYYRRRRBBRYYYBBBCCCYYYYYYMMY...
output:
No
result:
ok single line: 'No'
Test #20:
score: 0
Accepted
time: 301ms
memory: 21152kb
input:
BCCCCYYYYBBYMMMMBBBGGMGGGMMGGGKKKGGGGGGGGGYYYYMYYYRRCCCKYYYYYKKRRRRKKKRRRRRRRRRGGGRMMMMRRCRRRRRCCMMMMCCCCCCCCCGGGRRCCCCCRRRBBBRRGGMMMGGGRRBRMMCCCCMMRKKKKKBBBBBKRBBCCCCCCCCRRRRMMMMMMMMGYYYGGRRRRGGGGRRRCCBBRRRCMMMMMMMMGGGBBBBCCCCMMMMMBYYMMMYBBYYYYBBBBGGGGMMMMMMGBBKKKRRRYYYBBBYRRKBGRKKKKKKKKKKRRRRCMKKK...
output:
No
result:
ok single line: 'No'
Test #21:
score: 0
Accepted
time: 319ms
memory: 21168kb
input:
BGGGGGGMRRRRRRRRRRMMMMMBMMMMCCCCCCYYMMMMYYBBBBBGKKKKKKGGGGBRRRRBBMMMMMMBGGGGGBYYYCCCCCYBBBGRBBBBBRRMMMMMMRRRRRMMMMRRGGGGCBBBBBKKKKKKCCCCCCCCCRBBBGGGGGYYYYBGGGGYYYYRGGGGGYCCCCYYYYYRRKKRRRRRBBBBBBKKKKYYYYRGKKBMMMMBBBBBRRRRRRKKGGGGRRRRRYKKKKKYRRRRRMMMMRRRRBBBBBMMRRRRRRRBBBBBYYYYYCCCCCBBBBBBKCCCCKKKYYYG...
output:
No
result:
ok single line: 'No'
Test #22:
score: 0
Accepted
time: 300ms
memory: 20996kb
input:
BBBBMMMMMBBMYYYYYMMCCCCCMMMKKKKYYYYYYKKGGGGGMMRRBBBBBBRRRRRCBBBBBBBCCCCRRYYYYYYYRRRRYYYYYYGGRRRRRRRRRRRCCCCCCGGGRRKKYYYYYKKCCCCCKRRRRMRRGGGGGGGRMMMMMMMRGGGGYYKKKKKRRRRRKYYYYGGMMMMMMMMMMMMMGCBBBBBBBBBBBBBCGGGGGYYYYYYYCCCCCRRRRRGGGGGGGYYYYYYYCYYYYYCKKKKKKKKKCCCCCCKKCGGGGGGGMMKKKCCCCCCCKKCCCCCKBMMMMMGG...
output:
No
result:
ok single line: 'No'
Test #23:
score: 0
Accepted
time: 290ms
memory: 20948kb
input:
BBBBBBBRRRRRRRRRRRBMMMMMMMMMBBBBGGGGGMMMMMMMMMMMGGRYYYYYGGGMMMMMMMMMMGGGGGGYKKKKKKKKKKKYYYYYCCCCCBKBBBBBBBBBBBKKKGGGGMMMMMMMMMGGGGGGGKKKKKBBBBBBBBCGGGGGGGGGCCCCRRRCCCCCYYYYYYYYYYYCCCCCCCCCCCCCCCCCCYYYYYYYYYYCCCRRRRRRRRRRCCCCCCCCCCCCCCBBBBBBBBBRRRRRRRRRRRRRYYYYYYYYYMMMMMMMMMMYRRRRRRRRRRRRRMGGGGGGGGGG...
output:
No
result:
ok single line: 'No'
Test #24:
score: 0
Accepted
time: 280ms
memory: 20840kb
input:
MMGGGGGGGGGGGGGGGGGGGMMMMMMMYYYGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGYYYYYYYYYYYYYYYYMGGGGGGGGGGGGGGGGGGGCCCCCCYYYYYYYYYYYYYKKKKKKKKKKKKKKKKKKKKKYYYYYCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCYCCCCCCCCCCCYYYYYYYCCCCCCCCCCCCCKKKKKKKKKKKKKKKKKKKKCCCCCCCCYYYYYYYYYYRRRRRRRRRRRRRRRRRCCCCCCCCCCCCCCCCCCCC...
output:
No
result:
ok single line: 'No'
Test #25:
score: 0
Accepted
time: 316ms
memory: 21464kb
input:
MMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGKKKKKKKKKKKRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK...
output:
No
result:
ok single line: 'No'
Test #26:
score: 0
Accepted
time: 1ms
memory: 3984kb
input:
GRRRRRRGGGGGGGGGGGGGBBBGGRRRGGGGGGGGGGGRRRGGGBBBBB 3
output:
Yes
result:
ok single line: 'Yes'
Test #27:
score: 0
Accepted
time: 60ms
memory: 9940kb
input:
GGGGCCMMRRYRRRYYKKKKKBBKRRRYYYRYYYMMMYGCCCKYYYKKCCCGGGCBMMCCBCMMBBBKKKBBGGBKKKMYYKMMMKKKYYKKCCMMCRRRRRYKRRKBBBBRRCCRMMGGBBBKKBRGGRRRRYYRRRYRRKBBGGKRRRRKKKGYYYGYYRGCCCGGGCBMMMRRMMMMKKGGGKBBKBMMCBBBCKKCCBBBKKCGGYYYMMMYYCBMKKKKKMMBYGGBBBGBRRRRRBGCCCGMMGBBBYBBBBBBCCRBBBRCCCYYCBBMRRMCCCRRRBBBYRRRYYCYKKK 2
output:
Yes
result:
ok single line: 'Yes'
Test #28:
score: 0
Accepted
time: 152ms
memory: 15056kb
input:
MMMKKKKKKKKGGGGKBBBBKKKKBCBBBMMMGGGGMCCCCCCCCMMMGGGMCYYYYYYYCCCCBBBGGGBGGBBBYBBBBYYYGGCCCCCKKKKKKKKBBYYYYBBCCCBBBYYYYBGRRRKKMMMKKRGGCCCCCCBBBYYYGMRRRRMMGGGMMMMMMGGGCCCMMBBBBBRRRRBYYYYRYYCBBCCCYYYYCBBCCCKKKKCBMMMKKBBBKKBRRYYYYRBBGYYYYGRRRRRRRRGGBKKKKMMMMMMMBBBBRRRKKKBCKKMMMMKKCCYYYBYYBBBMMRRRRMMYYCCC...
output:
Yes
result:
ok single line: 'Yes'
Test #29:
score: 0
Accepted
time: 313ms
memory: 21276kb
input:
CCCCCRRGGGCCMMGGGGGGMMMCCMMMMMGGGGGYYYYRRRRRRRRRRRRRRRGGMMMMMRYYBGGGGBBBBYYYYRRBBKKKKKKBBBKYYKBBBBBKKKYGGGGYKKKKYKKKRRRMMMMMRKKKKKRRYYYBBBBBBYYYKKKKKKRRRRRRYYYYKKGGGGGKBBMMKKKKKKMMBMMMMKKKKKKMYYYYBBMMMYYYYMMBKKYYYYYYYYYYYYYYYBBBBBBKCCCCKCRRRRCKKBBBBMMMMMMMMMMMMYYYYYYKKKKCCMMMYKYYYYKKKYYYYYRRRRMGGGGG...
output:
Yes
result:
ok single line: 'Yes'
Test #30:
score: 0
Accepted
time: 300ms
memory: 21008kb
input:
MYYYYYRRMMMMGGGGGGMYYYYYMMRYYYYYBBBBBBMMMMMRRRYMMMBBBRCCCCCKKKKKCCCCCCCRRRRRRRRRRCCCCCCCRRBBBBBBRRRCCCCCCRKKKYYYYYKKBBBRRMMMMMMMRRYYYYYYCCCGGGGGGCKKKKKKKKKKKKKKCCCCCCCCRKKKKKKMMBBCCCCCBBBBBBCBBBBRYYYYYYRRRRRBBBKKKGGGGGMMMMMGGKKKKBBGKKKKKGBBBBBBBGGGGKKCGGGGGCBBBBRRRRMMMMMRBCGGGGGGGGGCCCCBBBBBBCCCGGYY...
output:
Yes
result:
ok single line: 'Yes'
Test #31:
score: 0
Accepted
time: 275ms
memory: 21004kb
input:
CCMMMMMMCCRGRRRRRRKKKKKKKKRGRBBBBBBBBBBBBBBBBBRRRRRRRRRBRRRRRRRRRRRRRRGGMMMMGGGGGGGKKKKKCCCCCCBBBBBBBBBCKKKKGMMMMYMMMMMMMYYYYYYYYYYYYYYYYYYYYYGGGGBBBBBBBGGGYYYYYYYYYYMMMYYYYYYMMMMGGGKKKKKKKKKKKKKKGGRRRRYYYYYYKKKKKYYYYYYYYYKKYKKKKKKKBBBBBBBBBBBBBMMMMKGGGGGGGKMMMMMMBBBBBBBBMMMMMMMMMMMMMMMMKKKKKKKKKMMC...
output:
Yes
result:
ok single line: 'Yes'
Test #32:
score: 0
Accepted
time: 296ms
memory: 21368kb
input:
MGGGGGMMMMMMMKKKKKKKKKKKKMMMMMGGGGGGGGGGGGGGCCCCCCCCCCYYYYYYYYYYYYYYCGGKKKKKKKKKKKGGGGGGGGGCCCGMGGGGGGGGGGMMMMGGGGGGGGGGGGMMMKRRRRRRRRRRRRRRRKKKBBBBBBBBBBBBBKKKKKKKKKMMMRRRRRRRRRRRRRRRRRRRRRRBBBBBBGGGGGGGGGGGGGGGGGGGGGGGBBBBRRRRRGGGGGGGGGGGGGRRBBBBBBBBBBBBBRRRBBBBBBBBBBBBBBRRRRCCCCCCCCCRRRRRRRRRRRRR...
output:
Yes
result:
ok single line: 'Yes'
Test #33:
score: 0
Accepted
time: 285ms
memory: 20744kb
input:
CCCCCCCCCCCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMCCCCCMMMMMMMMMMMMMMMMMGGGGGGGGGGGGGGGGGGGGGGMMMMCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMRRRRRRKKKKKKKKMMMMMMRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKRRGGGGGGGGGGGGGGGGGGGGGGGGGGGRRRR...
output:
Yes
result:
ok single line: 'Yes'
Test #34:
score: 0
Accepted
time: 308ms
memory: 21292kb
input:
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBBBBBBBBBBBBBBBBBBBBBBB...
output:
Yes
result:
ok single line: 'Yes'
Test #35:
score: 0
Accepted
time: 1ms
memory: 3772kb
input:
GBBGGGBBBBBGGBBBBBBBBBBBBRRRRGGBBBRRRRRRRRRRRRRRR 4
output:
No
result:
ok single line: 'No'
Test #36:
score: 0
Accepted
time: 1ms
memory: 3780kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBGGGGGGBBRRRRBBBBBBBBRR 5
output:
Yes
result:
ok single line: 'Yes'
Test #37:
score: 0
Accepted
time: 1ms
memory: 3776kb
input:
GGBBBBBBBBBGGGGBBBBBBBGGGGGRRRRRRRRGGGGBBGGGGGGGGG 8
output:
Yes
result:
ok single line: 'Yes'
Test #38:
score: 0
Accepted
time: 1ms
memory: 3900kb
input:
RRRRRRGGGGGGGGGBBBBBBGRRRRRRRRRGGGGGGGGBBBBRRRRR 10
output:
No
result:
ok single line: 'No'
Test #39:
score: 0
Accepted
time: 1ms
memory: 3752kb
input:
RRRRRRRGGGGGGGRRBBBBBBBBBBBBBBBBBBBRRRRRBBBBBB 5
output:
Yes
result:
ok single line: 'Yes'
Test #40:
score: 0
Accepted
time: 1ms
memory: 3736kb
input:
GGGGKKMGGMMMYGGGKKKKKGCCCCYKKKGGYYGGGMRYYRRRYRMM 3
output:
No
result:
ok single line: 'No'
Test #41:
score: 0
Accepted
time: 1ms
memory: 3976kb
input:
YYYYYCKMMMMMYYYKKKKKKKKBBBCCCCKCCBBBCRRBBBBRRRCCC 4
output:
No
result:
ok single line: 'No'
Test #42:
score: 0
Accepted
time: 1ms
memory: 3724kb
input:
CMCCCCMMMCCCCCGCCCCCCCMMMMMKKKKKKCCCGGGGGMMMM 5
output:
No
result:
ok single line: 'No'
Test #43:
score: 0
Accepted
time: 1ms
memory: 3764kb
input:
KKKKKKYBBBBBBBBBBBBCCCCCCCCCCGGGGGGCCGGGGGGGCCYYYY 6
output:
No
result:
ok single line: 'No'
Test #44:
score: 0
Accepted
time: 1ms
memory: 3776kb
input:
GGGGGGYYYYYYYYYYYYYYYMMMMMMKKKKKKMMMMMMMMYYYYYYYYG 7
output:
No
result:
ok single line: 'No'
Test #45:
score: 0
Accepted
time: 1ms
memory: 3996kb
input:
BCCYYYYYYYYYCCCCCCCCCBBBBRRKKKKKKKKKKRRRRRRRBBBBBB 10
output:
No
result:
ok single line: 'No'
Test #46:
score: 0
Accepted
time: 1ms
memory: 3620kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYKKKKKKKKKKKKKKY 15
output:
No
result:
ok single line: 'No'
Test #47:
score: 0
Accepted
time: 0ms
memory: 3692kb
input:
YYYYYYYKKKKKKKKKKKKKKKKKKKKYYYYYYYYYYYYY 20
output:
Yes
result:
ok single line: 'Yes'
Test #48:
score: 0
Accepted
time: 1ms
memory: 3904kb
input:
GGGGGGGGRRRRRRRRRRRRRRRGGGGGGGGGGGGRRRRGGGGGGGGG 10
output:
Yes
result:
ok single line: 'Yes'
Test #49:
score: 0
Accepted
time: 1ms
memory: 4040kb
input:
GGCCCCGMGGGBRRRRKKGGGBGGGGBBBKKKKKBBBMMBKBBGKKKKKKKKMMYYYYMMMMMMMMMMMMYYRRRGGYM 3
output:
No
result:
ok single line: 'No'
Test #50:
score: 0
Accepted
time: 1ms
memory: 4028kb
input:
YYYGGGRRBGGGGGMCCCCCMMMMBBBBBMMYYYBBRRBBBBBCCCBBBBGGGGGGGGGGGMMMCCCCCCMMMMMCCG 4
output:
No
result:
ok single line: 'No'
Test #51:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
GGYYYYGGGCCCCCMMMMRRRRRRMCCCCCYYYYCGGGGGCCCKYYYYYYYKYYYYYKKKKKYYKKKGMMMYYYYYM 5
output:
No
result:
ok single line: 'No'
Test #52:
score: 0
Accepted
time: 1ms
memory: 4068kb
input:
KKGGGGGGKKBBBBBBKRKKKKKRRRRRRMMMMMMMKRRRRKKKKKKRYYYYYYRYYYYYYGKKKKKKKGGGGYCCCCCC 6
output:
No
result:
ok single line: 'No'
Test #53:
score: 0
Accepted
time: 1ms
memory: 3972kb
input:
YYYYYYYYYYYMMMMGGGGGGGGKKKKKKKRRRRRRRRRRRKKKKGGGMMMMMGCCCCCCCCCGGGGGGGG 10
output:
No
result:
ok single line: 'No'
Test #54:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
RRRGRRRRRRRGGGGRRRR 4
output:
Yes
result:
ok single line: 'Yes'
Test #55:
score: 0
Accepted
time: 6ms
memory: 5144kb
input:
YYMMMRRMMMRRBBYYYGCCCCCKMMCCCCKYYRRRRYYCCGGMMRMMMGGGCCGBBGRRGGGBBYMMMYYBBYYMMMMMMMYMMMMYRRRRCBYYYYBBRRBBRRBCCRRRRRRCCKKKKRRCGGCBKKKKRRBBBRRBBBRRRRCR 3
output:
No
result:
ok single line: 'No'
Test #56:
score: 0
Accepted
time: 6ms
memory: 5188kb
input:
MMMYYYYYYGGGGYYCGGGBBMGGKKKKGGMMMBGGGBGGGGYYYYYGBKYYYYYKKKBRRRRRBGGMMMMBYYYYBBCCCCCBBKKKYYYYKCCBBBBGGGCCKKKKCMRRRMKKKMMCCBBBMMMYGGRRRGGGBBBGGGGGKKKKKB 4
output:
No
result:
ok single line: 'No'
Test #57:
score: 0
Accepted
time: 6ms
memory: 5108kb
input:
MMCCCCCCMKKYCMMMMMCMMMCCCCCCMMCRMMMMMMRRRCCCCCCMMMMMCGGGGGGMMMMMMYYYYYMMMMMMMMMMMKKYYGGGGGGYYYYKKMRYCCCCCYYYYRRRRKMGGGGGMMMMMKMMMMRRRRMMMRRRRRYYYYYR 5
output:
No
result:
ok single line: 'No'
Test #58:
score: 0
Accepted
time: 6ms
memory: 5348kb
input:
MCCCMMMMMMMCCCCMMMMMMMMMMCMMMMRRRRRRKKCCCCCCCCCCCKKKKKRRRRRCMMMMMMMCYYYYYYCCCBBBBBMCGGRGGGYYYYYYYYYYYGGRRRGGGGGBBBBBGRGGGGCGGGGGBBBBBBCCCKKCCCCCCKKKKK 6
output:
No
result:
ok single line: 'No'
Test #59:
score: 0
Accepted
time: 6ms
memory: 5132kb
input:
RRMMMMMMMRRGGYYYYYYYYGGKKKKKKKKKKKKKKCCCCCCCCKRRRRRRRYYYYYYCCGGGGGGGGCCCCGGGGGGGGCYYRMMMMMMMCCCCCCCKKKKKKKKKGGYYYYYYYYGGGMMMMMMCCCCYYYYYYYCCCCCMRRR 8
output:
No
result:
ok single line: 'No'
Test #60:
score: 0
Accepted
time: 6ms
memory: 5040kb
input:
GGGYYYYYYYYYYGGBRRRRRCCCCCCKKKKKKKKKKCCCCCRRRRRRRRRRRKKKKKKKKKGGGGKKKKKKKKKGGGGGKKGGGGGGGGGGGRRBBBBBBBBBBRRRRRRRRCCCCCCCCCRRBBBBBBBBBBBBBBBBBBGGGGGG 10
output:
No
result:
ok single line: 'No'
Test #61:
score: 0
Accepted
time: 3ms
memory: 5316kb
input:
CCCCCCCCCCCCCMMMMMMKKKKKCCCCCCCCCCCCMMMCCGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMMMYYYYYYYYYYYYYYYMMCCCKKKKKKKKKKGGGGGGGGGGGGGGGMMMMMMMMMC 15
output:
No
result:
ok single line: 'No'
Test #62:
score: 0
Accepted
time: 1ms
memory: 3928kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 4
output:
Yes
result:
ok single line: 'Yes'
Test #63:
score: 0
Accepted
time: 15ms
memory: 6388kb
input:
KRMMRRRRGGGYYYGGGYMMMMMMMMKRKKKKKMMKYYYYKCCCRGGRGGGGGGRRRRKKRRRRYGGGGCCYYGRRGGCCCMMMMYYBBBBGGGCCCBKYYYKBBBRRRCCCRBCCCBKKBYYRRRYBBKKKBYYMMYBBYYYYYRRRYYYKMMMKKKKRRRRKKYYYRYMMGGMYYYYCCRMMMBBBBMBBBBGGGG 3
output:
No
result:
ok single line: 'No'
Test #64:
score: 0
Accepted
time: 10ms
memory: 6396kb
input:
CCCYYYCKKCCCCCRRRRYYYYYGGGCCCCCGBMYYYKKKKYBBBBBBGGGBGKKKKGGGGGGGMCCCCCMMYYYYYYYYYYMMKKKRRRRKMMMMKMMMMMYYYBCCCCCCCKKKCCCCCCCCBYYYYYBBBBBRYYYRKKKKBYYYYBBKYYYCCCKKRRRBBBYBBBBYYBCCCRRRRBBBBYBBMMMMYYYRKCCC 4
output:
No
result:
ok single line: 'No'
Test #65:
score: 0
Accepted
time: 13ms
memory: 6516kb
input:
KKKKKKKKKKCCCCCKMMMMMMRRKKKKKKRRKYYYYYKYRGGGGBKKKKMMMMMKBBBBBRRGGGGGRRRRRBBCCCCBBRRGGGGRYMMMCCYYYYYCCCCMMRRRRRMYBBBGBBBBBGGGGBBBCCCCCBRRRRRRRRRRBYBBBBBBYYYMMMMCCCCCMBRBBBBKKKKKKRRRYGGGGGYYCCCCKKK 5
output:
No
result:
ok single line: 'No'
Test #66:
score: 0
Accepted
time: 14ms
memory: 6428kb
input:
GCCCCCCCCCCCGYYYYYYGMMMMMGMMMMMMGGGGMMGCCCCCCCMMMMMGGGGMMRRRRRRRRKKYYYYYYKKMMMMMMKKKKKKKKRRRMMMCCCCCGGGGGGGGYYMMMMMYYYYYGKKKKKYYYYYYYGMMMKKKKKMMMMMMMRRRRRYYYYYYMMGGGBBBGGGGGGGBBGGGGGBKCCCCCKKRRRRRKKB 6
output:
No
result:
ok single line: 'No'
Test #67:
score: 0
Accepted
time: 14ms
memory: 6412kb
input:
CCCCCCCCGGGYYYYYYYGGGGGBBBBBCCCCCCCBGGGGGGGGBRRRRRRRRBCYYYYYGCCCCCCCCCGGGGGGGYYKKKKKKKKYBBBBBBMMMMMMMMBBYCKKKKKKMMMMMMMMKCBBBBBBBBKKRRRRRRRKKKKMMMMRRRRRRRRMMMMKKKCCMMMMMMMMMCCCCCCCCYYYYYYYCCCRRRRRRRR 8
output:
No
result:
ok single line: 'No'
Test #68:
score: 0
Accepted
time: 14ms
memory: 6296kb
input:
RRRRRRRRRRRRYYYYGGGYYYYYYYYYYYGGGGGGYMMMMMMMMMMMYYYYYYYYYYYKKKKKKKKKYYYKKKKKKKKKKYYYYYYYRRRRRRRRRRRYMMMMMMMMMMYRRYYYYYYYYKKKKKKKKKKKYRRGGGGGGGGGRRBBBMMMMMMMMMBCCCCCBBBBBBBBBBCCCYYYYYYYYYYYCBBBBBB 10
output:
No
result:
ok single line: 'No'
Test #69:
score: 0
Accepted
time: 12ms
memory: 6260kb
input:
GCCCCCCCCCCBBBBBBBBBBBBBBBCCCCCYYGGGGGGGGGGGGGYGGGGGGGGGGGGGGGYYMMMMMMMMMMMMMMMYYYYYYYYYYYYGGYYYYYYYYYYYYGGGGGGGKKKKKKYYYYYYYYYYYYYYYKKCCCCBBBBBBBBBBBBBBCCCCCCCCCCKKKKKKKGKKKKKKKKKKKKKKKGGGGGGG 15
output:
No
result:
ok single line: 'No'
Test #70:
score: 0
Accepted
time: 11ms
memory: 6100kb
input:
CCCBBBBBBMMMKKKKKGGGGGGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKMMMMMMMMMMMMMMMMMBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCMMMMMKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGKMMMMMMMMMMMMMM 20
output:
No
result:
ok single line: 'No'
Test #71:
score: 0
Accepted
time: 1ms
memory: 3688kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 5
output:
No
result:
ok single line: 'No'
Test #72:
score: 0
Accepted
time: 14ms
memory: 6432kb
input:
CCCGRRRGGRRYYYRMMRRMMMBBBBGGGMRCCCCCCRRRCBBBBMBBBCCCCGGGGCCBBBBCGGGRRRRCCCYYYYYYYKCCCCKKKGCCCRCYRRRRYYYRRRRYYYRRRCYYYRRRRYYYCCCMMMMYRKKKYYYKRYYYYRRKKKCRYYYCCCCRMMMMKKKCCCRRRMMMMBBBBKKKKKRRRRMMMRKKKKRR 3
output:
Yes
result:
ok single line: 'Yes'
Test #73:
score: 0
Accepted
time: 14ms
memory: 6588kb
input:
CCCCCCRRRRRBYYYBBMMMMMMYGGGGGMMMMMGGGGGYYRKKKKRRRRYBBBBYMMMMMMCCKKKKKGGGGCCYBCCCCCGYYYYYYGGGGMMMCCCCCCCCCCCCRRRRRRBBBBCCCCMMBGGBBBBRRRRRRRRRBGCCCCCCKKKKKMMMMMBBBBBBBBBBKGYYYYKKKKKGMMMMMBCCGGGGGCKKKKKC 4
output:
Yes
result:
ok single line: 'Yes'
Test #74:
score: 0
Accepted
time: 13ms
memory: 6316kb
input:
YYYYYYYYYYYYYRYYYYYRMMCCCCCCCCCCCCCBBBBBBBCBBBBBBCCCCCCBGGGGGGGMMMCCCCCCRMMMMMKKKKKYYYYYYKRRRRRRKKKKKKKKKKKGGGGGMRRCKKKKKCRMMBBBBBBBMMMMMRCCCCCCCRRRCCCCCRRCCCCCCCCCCCCCKYYYYYKKKKKKCCCCCCCCCRRRRRRCC 5
output:
Yes
result:
ok single line: 'Yes'
Test #75:
score: 0
Accepted
time: 13ms
memory: 6240kb
input:
RRRRRRRRRGMRRKKKKKKGGGGGGGGKKRRRRRRRMMGMMMMMMMMRRRRRRRMGGGGGGGMMCCGMMMMMMMMMMMMMMMMGGGGMMMMMMGCCCCMCCCCCCCCCCCCGGGGGGGCCRRRRRGGGGGGRRRCCCCGCCCGGKKKKKKKKKKKKKKKMMMMMMMKGGGRRRRGGGGGGGGRRBBBBBBBBG 6
output:
Yes
result:
ok single line: 'Yes'
Test #76:
score: 0
Accepted
time: 14ms
memory: 6664kb
input:
MGGGGGGGGGGCRRRRRRRRRRRRRRRRRRRRRCCCCCCCCCCCCCMMMMMMMMMCCCCCCCCCCMMMMMKKYGGMMMMMMMMMMMMMMMMMMMMMGGGGGKKKKKKKKGGGYYYYYKKKKKKKKKRRRRRRRRRRKKYYYYYYKKKKKKKKKYYYYYYYYYYYYYYYYYYYYYYKMBBBBBBBBBBBBBBBBBBBMMMM 8
output:
Yes
result:
ok single line: 'Yes'
Test #77:
score: 0
Accepted
time: 11ms
memory: 6044kb
input:
CCCCCBBBBBBBBBBBBBBCCGGGGGGGGGGCCCGYYYYYYYBBBBBBBBBMMMMMMMMMMBBBBYYYYGCBBBBBBBBBBBGGGGGGGGGGGBCCCCCCCCCCCCCCGGRRRKKKKKKKKKKKKRRRRRRRGGGGGGGGGGGGGGGGGCCCCCRRRRRRRRRRCCCCCCCCCCCCCCCCCCCCCGG 10
output:
Yes
result:
ok single line: 'Yes'
Test #78:
score: 0
Accepted
time: 13ms
memory: 6156kb
input:
CCCGGCCCGGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCCCGGGGGGGGKKKKKKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCCCCKGGGGGGGCCCCCKKKKKKKKKKKKKKKKKCCCMMMMMMMMMMMMYYYYYYYYYYYYYYYMMMMMMMMGGGGGKKKKKKKKKKKKKKKGGGGGGGGGGGMCCCCCC 15
output:
Yes
result:
ok single line: 'Yes'
Test #79:
score: 0
Accepted
time: 11ms
memory: 5920kb
input:
CRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKKKKKKKKKKMRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKRRRRCCCCCCCCCCCCGGGGGGGGGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCC 20
output:
Yes
result:
ok single line: 'Yes'
Test #80:
score: 0
Accepted
time: 12ms
memory: 6180kb
input:
KKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKK 25
output:
Yes
result:
ok single line: 'Yes'
Test #81:
score: 0
Accepted
time: 58ms
memory: 10136kb
input:
MKKGGGCGGGMMGMMYYYYGYYRRRRYCCYGGGMMCRRRCCKKCKRRKCRRRRCKKKRKKBBBYYYRGGGGGRRMMMMRBBRMMRRRKKKRRRRRRRRRGBBGRRGKKKCCCGGGGYYCBBKKYYYBYBBRRBBBBKGKKKRKKKRGGGGGGGCCCCYYYYGKKKKRRKCCCMMMMGGRRMKMMMKRYGGGGYRRYKCCCMCKKKKCCCRCCCRRGGRCCCCMMKMMMMKGGYBBYRRMMMYYMYYYRRRYYYCCYBYYBBBBYYGGGGYBBMMCCCCMRGGGGKKGRRMMYGGMMMMMM 3
output:
No
result:
ok single line: 'No'
Test #82:
score: 0
Accepted
time: 56ms
memory: 10040kb
input:
GMKKKKMMGBBKKKKKBBBBBBBBYYYBBBRRRBCCCBCGGGGRRYYYRKYYRRRRYYYKKKRRRYYYRKMMMBBBBCCMMMMMMMBBBBBMBBBBBMMMMBBBCCBBBCBCCKKKKKKKKBCCCCCBGGKKKGGGYMMGGGGGMMYYKKKYCCCCCCKKKYYYYCCRRRRYMRRRGGMBBMMMMBBBMMMGMMKRRRRKKRRRCYYYYCCCYCCKBKKKKBBCBBGBBBRRRRRBBCCCGGGRRMMYYYMMMMYYMCCCCMRRGMBBBBBBBMMBCCCYRYCCCCCCYYYYRRRRYY 4
output:
No
result:
ok single line: 'No'
Test #83:
score: 0
Accepted
time: 59ms
memory: 9696kb
input:
CRRRRRYYYYMMMMMMYYYYYYYYRRRRRRRRRRRRRBBBBRRRRRYYYYMMMMYCCBKBBBBBBKCKKKKCCCKKKYYYYGGGGKCKKKKKKCCCRRRRRRRBBBBCCCCGGGGGBBRBBBBBBBCMMMCCCCCCCCCCBBBBBMBBBBBMMMMGGGGGMMCCCCRBBKKKYYGGGGGYYKKKBBBBCCCCCCRRCCCCCRGGYYYYYGGGGGGGGYYMMMMMRKKKKKKRRRRMMMMGGGGGGMMCCCCMBBBBBBYBBBBBGGGBBBBBBGGBBBBBGYYRCBBBBCYYYYYY 5
output:
No
result:
ok single line: 'No'
Test #84:
score: 0
Accepted
time: 60ms
memory: 9844kb
input:
BBBBBBGGGGGGGBBBBBBBBBBBBBMCGRRRRRGGKKKKKKGGGCCMMMMMMMCKKKKRRRRRKCCYYYYYYYCCCCCCGGYYYYYKKKKKKYGBBBBBBBKKKKKKKBBBYYYYYBBGGBBBBMMMMMBBBGGGBBBBBBBGGGGGGGGGGGGGGGGGGGMGGGGGMYYYYYYMMMMRRRRCCCCCRRRRRRRRRRRRRRRMMMBBBKKKKKKGGGGGBBBBBBKKKKKKKGBGGCCCCCCCGGGGGBBCCCYYYYYYYCCCBBBBGGGGGGMMCCCCCCMMMMMBBMMCCCCCCC 6
output:
No
result:
ok single line: 'No'
Test #85:
score: 0
Accepted
time: 62ms
memory: 9988kb
input:
YYYYYGGGGGGGYKKKKKKKKYKKKKKKKYYRRRRRRRCCCCCCCCCCCCCCCCCCGMMMMMMMKKKKKKKKRGGGCCCCCCCCGGGGGGGGGGGGGGGGGGGGRKKKKKKKMMMMMMMMMMMMMMMMKKRRRRBBBBBBBBRKKKKKBBBBBBBBBBBBBBKRRRMMMMMMMMRRRRRKKGGGGGGGGGGGGGGGGGGGGKKKKKCCCCCCCCKKKKKKKKKKKMGGGGGGGCCCCCCCGGMMMMMMGGGGGKKKKKKKKKGGRRRRRRRRRGMMMMMMMYYBBBBBBBBBYYYYYYMG 8
output:
No
result:
ok single line: 'No'
Test #86:
score: 0
Accepted
time: 57ms
memory: 9832kb
input:
RRRCCCCCCRRRRRRRRRKKKKKKKKKKKRRCCCRBBBBBBBBBMMMMMMMMMRRRRRRCCCCMMMYYYYYYYYYMMMMMMYYYYYYYYYYYMMMMMMMMMMMMCCCCCKKKKKKBBBBBBBBBYYYMMMMMMMMMMMYYYYYYYMMMMMMGGGGGGGGGMMMMBBKKKCRRYYYYYYRRRRRRRRRBBBBBBBBBYYYYRRKKKKKKMMMMMMMMMMMKKBBBMYYYYYYYYYYYMMKKKKKKKKKMMMMMMMRRRRRRRRRBBBBBBBBBBBBBBBBBBKKKRRRRRRR 10
output:
No
result:
ok single line: 'No'
Test #87:
score: 0
Accepted
time: 54ms
memory: 9548kb
input:
CCCCCCCCGGGGGGGGGGGGGGGGCCCCMMMMMMMMMMMMMMMMCCCCCCCCCCCKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCMMMMMMMMMMMMMMMMCCCCCCCCGGGGGGGGGCCCCCCCCCCCCCCCGGGGGGCCCCCCCCCCCCCCKKKKKKKRRRRMMMMMMMMMMMMMMMRRRRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCKKKC 15
output:
Yes
result:
ok single line: 'Yes'
Test #88:
score: 0
Accepted
time: 62ms
memory: 9952kb
input:
MMMMMMMMMMRRRRRRGGGGGGGGGGGGGGGGGGGRRRRRRRRRRMMMMMMYYYYYBBBBBBBBBBBBBBBBBBBBYYYYYYYYYYYYMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMYYYYMMMMMMMMMMMMMMRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGYYYYYYYYYYYYYYYYYYYYYBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMM 20
output:
No
result:
ok single line: 'No'
Test #89:
score: 0
Accepted
time: 52ms
memory: 9788kb
input:
YYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBYYYYYGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGGGGGGGGGGYYYYYYYYYYYYYYMMMMMMMMMMMMMMMMMMRRRRRRRRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMYYYYYYGGGGGGGGGGBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGYYY 30
output:
No
result:
ok single line: 'No'
Test #90:
score: 0
Accepted
time: 315ms
memory: 21496kb
input:
RBMKYGCGBRYMCKBCMRGYKGMKCBYRGRKYCBMKBMGCYRGYMCRKBGKMBCYRYMRBKGCKGBMRYCGMBKYRCGCMBRKYCGYBKMRBRKYGCMBGMCYKRCYKMBGRBYRMGKCRGBKYCMBMGRYCKMRCBYGKRMGKYBCKBRYCMGMCRBKGYMRKCGBYGYCMBRKGBRMYKCRGKMBCYKRGBCMYMGYCRKBYCBKGRMBGYKRMCRMCYKBGRKCGMYBCBKYMRGKGYMRBCRKBGYCMYRGBMCKBKGYMRCKMGBRYCMKYRGBCMBCGKYRYGMBKRCBCGRMK...
output:
No
result:
ok single line: 'No'
Test #91:
score: 0
Accepted
time: 7ms
memory: 21168kb
input:
RMGCKYBKGBCYMRYGBKRCMBGMCYRKMBCKGRYBMGCKYRBYCMRKGBMKRGYCBMKRGYCKYGBCMRYGCBRKMCGBMYRKRKBYCGMCMRKYGBCBRMKYGBKRCMYGRCGBYKMKMRGCYBRKBMYGCMRYBGCKRYCGMBKMCRBKYGYRCBGMKGRCYBKMRMKYCBGYKCBRGMYGCRMBKMYBCKGRBKYMRCGRYMBCGKRBMGYKCKMBCRGYKCBMGRYGMCRYBKGMCRYKBMYKRGBCBGRMYKCMGYBKCRGBCRMYKMCRKYBGBKYCRMGCRBGYMKBGKRMC...
output:
Yes
result:
ok single line: 'Yes'
Test #92:
score: 0
Accepted
time: 317ms
memory: 21236kb
input:
CBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYK...
output:
No
result:
ok single line: 'No'
Test #93:
score: 0
Accepted
time: 317ms
memory: 21288kb
input:
CBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYK...
output:
Yes
result:
ok single line: 'Yes'
Test #94:
score: 0
Accepted
time: 321ms
memory: 21236kb
input:
MCCBBGRRKKYMCBGRKYYMMCBBGRRKYYMCBGGRKYYMCCBGGRRKYYMCBGGRRKYYMMCCBBGRRKKYYMCBBGRRKYMCBBGGRRKKYMMCCBGGRKYMMCBBGRRKYMCCBBGGRRKYMMCCBGRKKYYMMCCBBGRKYMMCCBBGGRKYYMMCCBBGRRKYMCCBGGRKKYYMCBGRKKYMMCBBGGRKKYMCCBGRRKYMMCBBGGRKYMCBGGRKKYMMCBGGRRKKYMMCCBBGGRRKKRGBCMYYKRGBBCCMYYKRRGBBCCMMYYKKRRGBCCMYYKKRGGBBCMMY...
output:
Yes
result:
ok single line: 'Yes'
Test #95:
score: 0
Accepted
time: 305ms
memory: 21092kb
input:
CBBGGRKKYMCBGRKKYYMMCBBGRKKYYMCBBGGRKKYMMCBBGRKYMCBGGRKYYMMCCBBGGRRKKYMCCBBGRRKKYMMCCBGRRKKYYMCCBGGRKKYMMCCBGGRKYYMMCBBGGRKYMMCBGGRRKYYMCCBBGRRKYYMMCBBGRKKYMMCCBGGRKKYMCBGGRRKKYYMCBBGGRRKYMMCCBBGRKYMMCCBGRRKKYYMMCCBGRKKYYMCBBGRRKYMMCCBGRRKYYMCBGRRKKRGGBBCCMMYKKRGGBBCMYYKKRGGBCCMMYKRRGGBBCMYKRGGBBCMY...
output:
No
result:
ok single line: 'No'