QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#707337 | #2513. A Color Game | becaido | AC ✓ | 428ms | 11416kb | C++20 | 1.9kb | 2024-11-03 15:33:41 | 2024-11-03 15:33:43 |
Judging History
answer
#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#ifdef WAIMAI
#define debug(HEHE...) cout<<"["<<#HEHE<<"] : ",dout(HEHE)
void dout(){cout<<'\n';}
template<typename T,typename...U>
void dout(T t,U...u){cout<<t<<(sizeof...(u)?", ":""),dout(u...);}
#else
#define debug(...) 7122
#endif
#define ll long long
#define Waimai ios::sync_with_stdio(false),cin.tie(0)
#define FOR(x,a,b) for(int x=a,I=b;x<=I;x++)
#define pb emplace_back
#define F first
#define S second
const int INF = 1e9;
const int SIZE = 505;
const string color = " RGBCMYK";
int n, m;
string s;
int cl[SIZE], a[SIZE];
int dp[SIZE][SIZE][8];
void solve() {
cin >> s >> m;
n = s.size();
s = " " + s;
for (int i = 1, c = 0, len = 0; i <= n; i++) {
len++;
if (i == n || s[i] != s[i + 1]) {
c++;
FOR (j, 1, 7) if (s[i] == color[j]) cl[c] = j;
a[c] = len;
len = 0;
}
if (i == n) n = c;
}
FOR (i, 1, n) {
fill (dp[i][i], dp[i][i] + 8, -INF);
dp[i][i][cl[i]] = a[i];
}
FOR (len, 2, n) for (int l = 1, r = len; r <= n; l++, r++) {
fill (dp[l][r], dp[l][r] + 8, -INF);
FOR (k, l, r - 1) {
int mx = *max_element (dp[k + 1][r], dp[k + 1][r] + 8);
FOR (x, 1, 7) if (dp[l][k][x] != -INF) {
dp[l][r][x] = max (dp[l][r][x], dp[l][k][x] + max (dp[k + 1][r][x], mx >= m ? 0 : -INF));
}
mx = *max_element (dp[l][k], dp[l][k] + 8);
FOR (x, 1, 7) if (dp[k + 1][r][x] != -INF) {
dp[l][r][x] = max (dp[l][r][x], dp[k + 1][r][x] + max (dp[l][k][x], mx >= m ? 0 : -INF));
}
}
}
cout << (*max_element (dp[1][n], dp[1][n] + 8) >= m ? "Yes\n" : "No\n");
}
int32_t main() {
Waimai;
solve();
}
詳細信息
Test #1:
score: 100
Accepted
time: 0ms
memory: 3616kb
input:
BBBRRRRRRGGGB 3
output:
Yes
result:
ok single line: 'Yes'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
BBBRRRRRRGGGB 4
output:
No
result:
ok single line: 'No'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
RRRRGGGRRRRRG 3
output:
Yes
result:
ok single line: 'Yes'
Test #4:
score: 0
Accepted
time: 44ms
memory: 8256kb
input:
GMYCGMRMGYMRMKCBKBMKKBMMKBBKMBMRRMGYKKMBKMYRGGBMRMKKKBRCMKYCCKYGYYKKCKRCYGGKGRBCKMYMRCRGBRRYCCKKRRKRCKMMMGCCGYYKMCRGMKCYBMRRKYYRRKGGRBMCKGBBYYGGGBBYBBRCCMGKKGRGRMRRBRCYGGGKBRKCBYCKMMBRCGKCCYYMMCKGRBYRRGBBCGYKBBMKRBBKGCRBYCKMYKMCKMBRMGGYBKBRBMYGGCKYCMYKBRCCGCYRRRKCKCBKCMCYBKRBKMCCYRBKBGGMGMCBGMBMYCCK 1
output:
Yes
result:
ok single line: 'Yes'
Test #5:
score: 0
Accepted
time: 8ms
memory: 6312kb
input:
KKCCCCCKYYYYYYKKKCRRCCBBBGGMMGCKKBBBBBRCCRRCRRYYCCYYBGGGBKKKBKKKCMKKMCCCGGGCCCCBBBCCKMMMKCCYYBBCCCCCCCCCYYCCCCBMMBRRRBBGGMKKBYMMMYYBBBBYYYYKCCCMMCKKMMMKKGGMBBRRBBBBKKBBBMMMMKKMMMKKKMMYYGMYYYMRRBMMMBGRRGGMMCCGRRBBBGCGGGCBBBCCBGGGGCRKKBBBRRYYYBBBYYKKKYYYBBYYBBBBCCCRKYGGGYYKKKKKKKKKRCCCYKKRRRKKMMMKMMC 2
output:
Yes
result:
ok single line: 'Yes'
Test #6:
score: 0
Accepted
time: 6ms
memory: 4248kb
input:
BYCCCYYBMMMMMMMMGYYYBBBYGBBBGGGKKKKKKGGGKKKBBBBKKBBBYYGGGGYGGGMGGGGMCMCCCMMMYYYYYYYYYYYCCCGGGCCRRRCRRBBBBRCCCCCGYCCCCCCYYCCCGGMGGRRRBCCCBMMMMBRCCCCGYYYGRYYYRRMMMMMRRRRMCBBGGGBBGYYYGGGCCGGGGMMBBGGRRRRGBRRRRYYYYBCCCYCCKKKMMMMCCYGGGYCBBBYYYYCCCCYCCCMMMMYYCBBBBBBBCCCCCGGGGCCCGGGGCCBBBBBGGGGMMMBKKKKMMM 3
output:
Yes
result:
ok single line: 'Yes'
Test #7:
score: 0
Accepted
time: 3ms
memory: 5716kb
input:
RMMMRRRRRRMMMMMMMMMMMMMGGGGBBBBMYYYRRRRRRYYMMGGGGMMMYMMRRRKKKKYYYYYYMMMMMMRRRRRKRKKRKKKKRRRKYYYKKKKYKCCCMMKKKKKMMMCKRRRKKKKRRRRRMMMGGGGGGMMMRCCCCYYYYCCCBBBBCCYCCCCCYYYYRRYYYYRRRRRRRRRRRRRBBBKKKKBRRRRBRRRBBBBBGGGGGGBYGGGGGGYKRBBBBBBRRRCCCCCCCCCRRRRRRRRKCCCCKYYYYKKKMMMMKKKBBMMMMBBBBBBBBKKKKKKRRRR 4
output:
Yes
result:
ok single line: 'Yes'
Test #8:
score: 0
Accepted
time: 2ms
memory: 4068kb
input:
BBKKKKKBBBCCCKKKKKKKKKKKKKCCKGGGGGGGCCCCCCMMMMMMMRRRRRRRRRYYKKKKKKYYYRRRRRKKKKKCBBBBBBBBBBRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBGGGGGGBBBRRRRMMMMMRMMYYYYYYBBBBMMMMMBBYMMMKGGGGGGGKKKKMGGRRRRRRGGGGRRRRRRRYYYKKKBBBBBBKKKCCCCCCKBBBBBBYBBBBBBBBBBBBBBYYBBBBBBBBBBBYYCCCCCYBBBBBBYRRRRRRYMMMMMMGGGGGGGMMMMMYY 5
output:
Yes
result:
ok single line: 'Yes'
Test #9:
score: 0
Accepted
time: 1ms
memory: 3860kb
input:
BBMMCCCCCCCCCMMMMKKKKKKMMMBCCYMMMMMCYYYYYYYCCCCCMMMMMMMYYYYMMMMCCCYYYYYYYYYCCCCMMMMMMMMCCMMMYCCCCCBBBBBBBBBRRRRRRRRBMMMMMMMGGGGGGGGGGGGGGGGGMMMMMMMMMMGGGGBBBBBBBCCCCCCBBGGCCCCCCMMMCCCCCCCCKKKKKKKCMMMBBCMMMMMMMMCCCBBBKKKKGGGGGGKKKKKBBBBCCCCMMMMMMRRRRRRGGGGRRRRRRRGKKKKKKKKKKKKKKKKKKKKKKMMMMMMMMKKGGGG 6
output:
Yes
result:
ok single line: 'Yes'
Test #10:
score: 0
Accepted
time: 0ms
memory: 4000kb
input:
GGGGGGGGGGGGGGGGRRRRRRRRCCCCYMMMMMMMMCCCCCCCCCCMMMMMMMMMMMMMYYMMMMBBBBBBBBMMMMMYMGGGGGGGGGGGGGGGGGGGGGMMMMMMMMMMMMBBBBBGGGGGGGGGGBBBBBBMMMMKKKKKRRRRRRRRRRRKKKKMMMMMMMYYYYYYYYYYKKKKKKKKKYYYYYBBCKKKGGGGGGGGGGGGKKKKKCCCCMMMMMMMMMMCCCCCBMMMMMMMMMMMBBBBBBBYMMMMMMMMMMMMYYYYYYYYYYYYCGGGGGGGGGGCCCCGG 8
output:
Yes
result:
ok single line: 'Yes'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
MMMMMMMMMMMMMCCCCCCCCCCCGGGGGGGGGGGGGGGGGGGCCCCCCCCCMMMMKKBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCMMMRRRRRRRRRBBBKKKKKKKKKKKKKKKCCCCCCCCCCCCCRRRRRRRRRRRRRRRRRRCCCCCCCCKKKKKKKMKKKKKKKKKKYYYYYYYYYYYYYYYYYYKKKKKKKKKMM 16
output:
Yes
result:
ok single line: 'Yes'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
GGGGMMMMMMMMMMMMMMMMMMMMMMMMMMRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYMMMMMMMMMMGGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGG 30
output:
Yes
result:
ok single line: 'Yes'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
RGB 1
output:
Yes
result:
ok single line: 'Yes'
Test #14:
score: 0
Accepted
time: 1ms
memory: 3800kb
input:
BBRBBBRBRBBBRRBBRRBBRRRRBBRRBBRRBRRRRRRBRRRRBBBRBRBBBRRBBRRBBRRRRBBRRBBRRBRRRBBBRRRBRRRBB 4
output:
Yes
result:
ok single line: 'Yes'
Test #15:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 200
output:
Yes
result:
ok single line: 'Yes'
Test #16:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 300
output:
No
result:
ok single line: 'No'
Test #17:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 3
output:
Yes
result:
ok single line: 'Yes'
Test #18:
score: 0
Accepted
time: 23ms
memory: 6684kb
input:
GCGRRRRRGCCBKMMBBYYYYYKRCCCMCCGCCGGGRGGBRRRBRMMMYCCYRKMRRRRRCRMMMCCCMCRRCGGCMMMKKMMCKKMCMKMCYKCCCCKBKKKKMKKKBBBBBRYKKBBGGGYYRRCBBCYYKKKKKKYMYYCKYKKCCYYYBCCCMCGMGGGRGRRKRGGKGMGKBKGGBRMMMKGKGKRRBBKKKGGRRRRGBBKKKRRRKRMMMMRGGGYGCCCCRCMKKKCGRRRGBBYMCCCMRBBCCGBBGBBRMMKKRYYYYYKKKKYYYRRYGKRMMMYYRCCCYYYCMMMR 2
output:
No
result:
ok single line: 'No'
Test #19:
score: 0
Accepted
time: 26ms
memory: 6492kb
input:
BBKKYGGGGYKKKKKCCGGCKKKMMBRRRBBBBBKKKKRRRRBYYBBBBMBBBMYCMMMMBBBCCYCCCYYYYMMCCCBBGGGRRGGGRRBMMMMRRRRMYYYYKKMCCCCMKMMMMKKMKGGCCCCBBCYYYCGGCCCCCYYYYCRRRRRRRRRRRRRRRMRYYYRRMBBBBKGGBBBBMGRRRRYBBYYYGGKKKKCCCMRYGGKGGGGKKKKKYGMMMGGBBBBBBBBGGGGGGMMMGGYBBBBRMCRRRRRYYYYBRYYYKKKKKRRYYYYRRRRBBRYYYBBBCCCYYYYYYMMY...
output:
No
result:
ok single line: 'No'
Test #20:
score: 0
Accepted
time: 29ms
memory: 6336kb
input:
BCCCCYYYYBBYMMMMBBBGGMGGGMMGGGKKKGGGGGGGGGYYYYMYYYRRCCCKYYYYYKKRRRRKKKRRRRRRRRRGGGRMMMMRRCRRRRRCCMMMMCCCCCCCCCGGGRRCCCCCRRRBBBRRGGMMMGGGRRBRMMCCCCMMRKKKKKBBBBBKRBBCCCCCCCCRRRRMMMMMMMMGYYYGGRRRRGGGGRRRCCBBRRRCMMMMMMMMGGGBBBBCCCCMMMMMBYYMMMYBBYYYYBBBBGGGGMMMMMMGBBKKKRRRYYYBBBYRRKBGRKKKKKKKKKKRRRRCMKKK...
output:
No
result:
ok single line: 'No'
Test #21:
score: 0
Accepted
time: 16ms
memory: 6236kb
input:
BGGGGGGMRRRRRRRRRRMMMMMBMMMMCCCCCCYYMMMMYYBBBBBGKKKKKKGGGGBRRRRBBMMMMMMBGGGGGBYYYCCCCCYBBBGRBBBBBRRMMMMMMRRRRRMMMMRRGGGGCBBBBBKKKKKKCCCCCCCCCRBBBGGGGGYYYYBGGGGYYYYRGGGGGYCCCCYYYYYRRKKRRRRRBBBBBBKKKKYYYYRGKKBMMMMBBBBBRRRRRRKKGGGGRRRRRYKKKKKYRRRRRMMMMRRRRBBBBBMMRRRRRRRBBBBBYYYYYCCCCCBBBBBBKCCCCKKKYYYG...
output:
No
result:
ok single line: 'No'
Test #22:
score: 0
Accepted
time: 11ms
memory: 6148kb
input:
BBBBMMMMMBBMYYYYYMMCCCCCMMMKKKKYYYYYYKKGGGGGMMRRBBBBBBRRRRRCBBBBBBBCCCCRRYYYYYYYRRRRYYYYYYGGRRRRRRRRRRRCCCCCCGGGRRKKYYYYYKKCCCCCKRRRRMRRGGGGGGGRMMMMMMMRGGGGYYKKKKKRRRRRKYYYYGGMMMMMMMMMMMMMGCBBBBBBBBBBBBBCGGGGGYYYYYYYCCCCCRRRRRGGGGGGGYYYYYYYCYYYYYCKKKKKKKKKCCCCCCKKCGGGGGGGMMKKKCCCCCCCKKCCCCCKBMMMMMGG...
output:
No
result:
ok single line: 'No'
Test #23:
score: 0
Accepted
time: 3ms
memory: 5592kb
input:
BBBBBBBRRRRRRRRRRRBMMMMMMMMMBBBBGGGGGMMMMMMMMMMMGGRYYYYYGGGMMMMMMMMMMGGGGGGYKKKKKKKKKKKYYYYYCCCCCBKBBBBBBBBBBBKKKGGGGMMMMMMMMMGGGGGGGKKKKKBBBBBBBBCGGGGGGGGGCCCCRRRCCCCCYYYYYYYYYYYCCCCCCCCCCCCCCCCCCYYYYYYYYYYCCCRRRRRRRRRRCCCCCCCCCCCCCCBBBBBBBBBRRRRRRRRRRRRRYYYYYYYYYMMMMMMMMMMYRRRRRRRRRRRRRMGGGGGGGGGG...
output:
No
result:
ok single line: 'No'
Test #24:
score: 0
Accepted
time: 1ms
memory: 3752kb
input:
MMGGGGGGGGGGGGGGGGGGGMMMMMMMYYYGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGYYYYYYYYYYYYYYYYMGGGGGGGGGGGGGGGGGGGCCCCCCYYYYYYYYYYYYYKKKKKKKKKKKKKKKKKKKKKYYYYYCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCYCCCCCCCCCCCYYYYYYYCCCCCCCCCCCCCKKKKKKKKKKKKKKKKKKKKCCCCCCCCYYYYYYYYYYRRRRRRRRRRRRRRRRRCCCCCCCCCCCCCCCCCCCC...
output:
No
result:
ok single line: 'No'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
MMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGKKKKKKKKKKKRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK...
output:
No
result:
ok single line: 'No'
Test #26:
score: 0
Accepted
time: 1ms
memory: 5620kb
input:
GRRRRRRGGGGGGGGGGGGGBBBGGRRRGGGGGGGGGGGRRRGGGBBBBB 3
output:
Yes
result:
ok single line: 'Yes'
Test #27:
score: 0
Accepted
time: 7ms
memory: 6316kb
input:
GGGGCCMMRRYRRRYYKKKKKBBKRRRYYYRYYYMMMYGCCCKYYYKKCCCGGGCBMMCCBCMMBBBKKKBBGGBKKKMYYKMMMKKKYYKKCCMMCRRRRRYKRRKBBBBRRCCRMMGGBBBKKBRGGRRRRYYRRRYRRKBBGGKRRRRKKKGYYYGYYRGCCCGGGCBMMMRRMMMMKKGGGKBBKBMMCBBBCKKCCBBBKKCGGYYYMMMYYCBMKKKKKMMBYGGBBBGBRRRRRBGCCCGMMGBBBYBBBBBBCCRBBBRCCCYYCBBMRRMCCCRRRBBBYRRRYYCYKKK 2
output:
Yes
result:
ok single line: 'Yes'
Test #28:
score: 0
Accepted
time: 11ms
memory: 6444kb
input:
MMMKKKKKKKKGGGGKBBBBKKKKBCBBBMMMGGGGMCCCCCCCCMMMGGGMCYYYYYYYCCCCBBBGGGBGGBBBYBBBBYYYGGCCCCCKKKKKKKKBBYYYYBBCCCBBBYYYYBGRRRKKMMMKKRGGCCCCCCBBBYYYGMRRRRMMGGGMMMMMMGGGCCCMMBBBBBRRRRBYYYYRYYCBBCCCYYYYCBBCCCKKKKCBMMMKKBBBKKBRRYYYYRBBGYYYYGRRRRRRRRGGBKKKKMMMMMMMBBBBRRRKKKBCKKMMMMKKCCYYYBYYBBBMMRRRRMMYYCCC...
output:
Yes
result:
ok single line: 'Yes'
Test #29:
score: 0
Accepted
time: 12ms
memory: 5968kb
input:
CCCCCRRGGGCCMMGGGGGGMMMCCMMMMMGGGGGYYYYRRRRRRRRRRRRRRRGGMMMMMRYYBGGGGBBBBYYYYRRBBKKKKKKBBBKYYKBBBBBKKKYGGGGYKKKKYKKKRRRMMMMMRKKKKKRRYYYBBBBBBYYYKKKKKKRRRRRRYYYYKKGGGGGKBBMMKKKKKKMMBMMMMKKKKKKMYYYYBBMMMYYYYMMBKKYYYYYYYYYYYYYYYBBBBBBKCCCCKCRRRRCKKBBBBMMMMMMMMMMMMYYYYYYKKKKCCMMMYKYYYYKKKYYYYYRRRRMGGGGG...
output:
Yes
result:
ok single line: 'Yes'
Test #30:
score: 0
Accepted
time: 11ms
memory: 6120kb
input:
MYYYYYRRMMMMGGGGGGMYYYYYMMRYYYYYBBBBBBMMMMMRRRYMMMBBBRCCCCCKKKKKCCCCCCCRRRRRRRRRRCCCCCCCRRBBBBBBRRRCCCCCCRKKKYYYYYKKBBBRRMMMMMMMRRYYYYYYCCCGGGGGGCKKKKKKKKKKKKKKCCCCCCCCRKKKKKKMMBBCCCCCBBBBBBCBBBBRYYYYYYRRRRRBBBKKKGGGGGMMMMMGGKKKKBBGKKKKKGBBBBBBBGGGGKKCGGGGGCBBBBRRRRMMMMMRBCGGGGGGGGGCCCCBBBBBBCCCGGYY...
output:
Yes
result:
ok single line: 'Yes'
Test #31:
score: 0
Accepted
time: 4ms
memory: 4096kb
input:
CCMMMMMMCCRGRRRRRRKKKKKKKKRGRBBBBBBBBBBBBBBBBBRRRRRRRRRBRRRRRRRRRRRRRRGGMMMMGGGGGGGKKKKKCCCCCCBBBBBBBBBCKKKKGMMMMYMMMMMMMYYYYYYYYYYYYYYYYYYYYYGGGGBBBBBBBGGGYYYYYYYYYYMMMYYYYYYMMMMGGGKKKKKKKKKKKKKKGGRRRRYYYYYYKKKKKYYYYYYYYYKKYKKKKKKKBBBBBBBBBBBBBMMMMKGGGGGGGKMMMMMMBBBBBBBBMMMMMMMMMMMMMMMMKKKKKKKKKMMC...
output:
Yes
result:
ok single line: 'Yes'
Test #32:
score: 0
Accepted
time: 2ms
memory: 3844kb
input:
MGGGGGMMMMMMMKKKKKKKKKKKKMMMMMGGGGGGGGGGGGGGCCCCCCCCCCYYYYYYYYYYYYYYCGGKKKKKKKKKKKGGGGGGGGGCCCGMGGGGGGGGGGMMMMGGGGGGGGGGGGMMMKRRRRRRRRRRRRRRRKKKBBBBBBBBBBBBBKKKKKKKKKMMMRRRRRRRRRRRRRRRRRRRRRRBBBBBBGGGGGGGGGGGGGGGGGGGGGGGBBBBRRRRRGGGGGGGGGGGGGRRBBBBBBBBBBBBBRRRBBBBBBBBBBBBBBRRRRCCCCCCCCCRRRRRRRRRRRRR...
output:
Yes
result:
ok single line: 'Yes'
Test #33:
score: 0
Accepted
time: 0ms
memory: 3868kb
input:
CCCCCCCCCCCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMCCCCCMMMMMMMMMMMMMMMMMGGGGGGGGGGGGGGGGGGGGGGMMMMCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMRRRRRRKKKKKKKKMMMMMMRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKRRGGGGGGGGGGGGGGGGGGGGGGGGGGGRRRR...
output:
Yes
result:
ok single line: 'Yes'
Test #34:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBBBBBBBBBBBBBBBBBBBBBBB...
output:
Yes
result:
ok single line: 'Yes'
Test #35:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
GBBGGGBBBBBGGBBBBBBBBBBBBRRRRGGBBBRRRRRRRRRRRRRRR 4
output:
No
result:
ok single line: 'No'
Test #36:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBGGGGGGBBRRRRBBBBBBBBRR 5
output:
Yes
result:
ok single line: 'Yes'
Test #37:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
GGBBBBBBBBBGGGGBBBBBBBGGGGGRRRRRRRRGGGGBBGGGGGGGGG 8
output:
Yes
result:
ok single line: 'Yes'
Test #38:
score: 0
Accepted
time: 0ms
memory: 3860kb
input:
RRRRRRGGGGGGGGGBBBBBBGRRRRRRRRRGGGGGGGGBBBBRRRRR 10
output:
No
result:
ok single line: 'No'
Test #39:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
RRRRRRRGGGGGGGRRBBBBBBBBBBBBBBBBBBBRRRRRBBBBBB 5
output:
Yes
result:
ok single line: 'Yes'
Test #40:
score: 0
Accepted
time: 0ms
memory: 3700kb
input:
GGGGKKMGGMMMYGGGKKKKKGCCCCYKKKGGYYGGGMRYYRRRYRMM 3
output:
No
result:
ok single line: 'No'
Test #41:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
YYYYYCKMMMMMYYYKKKKKKKKBBBCCCCKCCBBBCRRBBBBRRRCCC 4
output:
No
result:
ok single line: 'No'
Test #42:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
CMCCCCMMMCCCCCGCCCCCCCMMMMMKKKKKKCCCGGGGGMMMM 5
output:
No
result:
ok single line: 'No'
Test #43:
score: 0
Accepted
time: 0ms
memory: 3832kb
input:
KKKKKKYBBBBBBBBBBBBCCCCCCCCCCGGGGGGCCGGGGGGGCCYYYY 6
output:
No
result:
ok single line: 'No'
Test #44:
score: 0
Accepted
time: 1ms
memory: 5880kb
input:
GGGGGGYYYYYYYYYYYYYYYMMMMMMKKKKKKMMMMMMMMYYYYYYYYG 7
output:
No
result:
ok single line: 'No'
Test #45:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
BCCYYYYYYYYYCCCCCCCCCBBBBRRKKKKKKKKKKRRRRRRRBBBBBB 10
output:
No
result:
ok single line: 'No'
Test #46:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYKKKKKKKKKKKKKKY 15
output:
No
result:
ok single line: 'No'
Test #47:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
YYYYYYYKKKKKKKKKKKKKKKKKKKKYYYYYYYYYYYYY 20
output:
Yes
result:
ok single line: 'Yes'
Test #48:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
GGGGGGGGRRRRRRRRRRRRRRRGGGGGGGGGGGGRRRRGGGGGGGGG 10
output:
Yes
result:
ok single line: 'Yes'
Test #49:
score: 0
Accepted
time: 0ms
memory: 3624kb
input:
GGCCCCGMGGGBRRRRKKGGGBGGGGBBBKKKKKBBBMMBKBBGKKKKKKKKMMYYYYMMMMMMMMMMMMYYRRRGGYM 3
output:
No
result:
ok single line: 'No'
Test #50:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
YYYGGGRRBGGGGGMCCCCCMMMMBBBBBMMYYYBBRRBBBBBCCCBBBBGGGGGGGGGGGMMMCCCCCCMMMMMCCG 4
output:
No
result:
ok single line: 'No'
Test #51:
score: 0
Accepted
time: 1ms
memory: 5636kb
input:
GGYYYYGGGCCCCCMMMMRRRRRRMCCCCCYYYYCGGGGGCCCKYYYYYYYKYYYYYKKKKKYYKKKGMMMYYYYYM 5
output:
No
result:
ok single line: 'No'
Test #52:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
KKGGGGGGKKBBBBBBKRKKKKKRRRRRRMMMMMMMKRRRRKKKKKKRYYYYYYRYYYYYYGKKKKKKKGGGGYCCCCCC 6
output:
No
result:
ok single line: 'No'
Test #53:
score: 0
Accepted
time: 0ms
memory: 3884kb
input:
YYYYYYYYYYYMMMMGGGGGGGGKKKKKKKRRRRRRRRRRRKKKKGGGMMMMMGCCCCCCCCCGGGGGGGG 10
output:
No
result:
ok single line: 'No'
Test #54:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
RRRGRRRRRRRGGGGRRRR 4
output:
Yes
result:
ok single line: 'Yes'
Test #55:
score: 0
Accepted
time: 2ms
memory: 6180kb
input:
YYMMMRRMMMRRBBYYYGCCCCCKMMCCCCKYYRRRRYYCCGGMMRMMMGGGCCGBBGRRGGGBBYMMMYYBBYYMMMMMMMYMMMMYRRRRCBYYYYBBRRBBRRBCCRRRRRRCCKKKKRRCGGCBKKKKRRBBBRRBBBRRRRCR 3
output:
No
result:
ok single line: 'No'
Test #56:
score: 0
Accepted
time: 2ms
memory: 5788kb
input:
MMMYYYYYYGGGGYYCGGGBBMGGKKKKGGMMMBGGGBGGGGYYYYYGBKYYYYYKKKBRRRRRBGGMMMMBYYYYBBCCCCCBBKKKYYYYKCCBBBBGGGCCKKKKCMRRRMKKKMMCCBBBMMMYGGRRRGGGBBBGGGGGKKKKKB 4
output:
No
result:
ok single line: 'No'
Test #57:
score: 0
Accepted
time: 1ms
memory: 5692kb
input:
MMCCCCCCMKKYCMMMMMCMMMCCCCCCMMCRMMMMMMRRRCCCCCCMMMMMCGGGGGGMMMMMMYYYYYMMMMMMMMMMMKKYYGGGGGGYYYYKKMRYCCCCCYYYYRRRRKMGGGGGMMMMMKMMMMRRRRMMMRRRRRYYYYYR 5
output:
No
result:
ok single line: 'No'
Test #58:
score: 0
Accepted
time: 1ms
memory: 3804kb
input:
MCCCMMMMMMMCCCCMMMMMMMMMMCMMMMRRRRRRKKCCCCCCCCCCCKKKKKRRRRRCMMMMMMMCYYYYYYCCCBBBBBMCGGRGGGYYYYYYYYYYYGGRRRGGGGGBBBBBGRGGGGCGGGGGBBBBBBCCCKKCCCCCCKKKKK 6
output:
No
result:
ok single line: 'No'
Test #59:
score: 0
Accepted
time: 0ms
memory: 3672kb
input:
RRMMMMMMMRRGGYYYYYYYYGGKKKKKKKKKKKKKKCCCCCCCCKRRRRRRRYYYYYYCCGGGGGGGGCCCCGGGGGGGGCYYRMMMMMMMCCCCCCCKKKKKKKKKGGYYYYYYYYGGGMMMMMMCCCCYYYYYYYCCCCCMRRR 8
output:
No
result:
ok single line: 'No'
Test #60:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
GGGYYYYYYYYYYGGBRRRRRCCCCCCKKKKKKKKKKCCCCCRRRRRRRRRRRKKKKKKKKKGGGGKKKKKKKKKGGGGGKKGGGGGGGGGGGRRBBBBBBBBBBRRRRRRRRCCCCCCCCCRRBBBBBBBBBBBBBBBBBBGGGGGG 10
output:
No
result:
ok single line: 'No'
Test #61:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
CCCCCCCCCCCCCMMMMMMKKKKKCCCCCCCCCCCCMMMCCGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMMMYYYYYYYYYYYYYYYMMCCCKKKKKKKKKKGGGGGGGGGGGGGGGMMMMMMMMMC 15
output:
No
result:
ok single line: 'No'
Test #62:
score: 0
Accepted
time: 0ms
memory: 3492kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 4
output:
Yes
result:
ok single line: 'Yes'
Test #63:
score: 0
Accepted
time: 4ms
memory: 5740kb
input:
KRMMRRRRGGGYYYGGGYMMMMMMMMKRKKKKKMMKYYYYKCCCRGGRGGGGGGRRRRKKRRRRYGGGGCCYYGRRGGCCCMMMMYYBBBBGGGCCCBKYYYKBBBRRRCCCRBCCCBKKBYYRRRYBBKKKBYYMMYBBYYYYYRRRYYYKMMMKKKKRRRRKKYYYRYMMGGMYYYYCCRMMMBBBBMBBBBGGGG 3
output:
No
result:
ok single line: 'No'
Test #64:
score: 0
Accepted
time: 2ms
memory: 5776kb
input:
CCCYYYCKKCCCCCRRRRYYYYYGGGCCCCCGBMYYYKKKKYBBBBBBGGGBGKKKKGGGGGGGMCCCCCMMYYYYYYYYYYMMKKKRRRRKMMMMKMMMMMYYYBCCCCCCCKKKCCCCCCCCBYYYYYBBBBBRYYYRKKKKBYYYYBBKYYYCCCKKRRRBBBYBBBBYYBCCCRRRRBBBBYBBMMMMYYYRKCCC 4
output:
No
result:
ok single line: 'No'
Test #65:
score: 0
Accepted
time: 2ms
memory: 3796kb
input:
KKKKKKKKKKCCCCCKMMMMMMRRKKKKKKRRKYYYYYKYRGGGGBKKKKMMMMMKBBBBBRRGGGGGRRRRRBBCCCCBBRRGGGGRYMMMCCYYYYYCCCCMMRRRRRMYBBBGBBBBBGGGGBBBCCCCCBRRRRRRRRRRBYBBBBBBYYYMMMMCCCCCMBRBBBBKKKKKKRRRYGGGGGYYCCCCKKK 5
output:
No
result:
ok single line: 'No'
Test #66:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
GCCCCCCCCCCCGYYYYYYGMMMMMGMMMMMMGGGGMMGCCCCCCCMMMMMGGGGMMRRRRRRRRKKYYYYYYKKMMMMMMKKKKKKKKRRRMMMCCCCCGGGGGGGGYYMMMMMYYYYYGKKKKKYYYYYYYGMMMKKKKKMMMMMMMRRRRRYYYYYYMMGGGBBBGGGGGGGBBGGGGGBKCCCCCKKRRRRRKKB 6
output:
No
result:
ok single line: 'No'
Test #67:
score: 0
Accepted
time: 1ms
memory: 3980kb
input:
CCCCCCCCGGGYYYYYYYGGGGGBBBBBCCCCCCCBGGGGGGGGBRRRRRRRRBCYYYYYGCCCCCCCCCGGGGGGGYYKKKKKKKKYBBBBBBMMMMMMMMBBYCKKKKKKMMMMMMMMKCBBBBBBBBKKRRRRRRRKKKKMMMMRRRRRRRRMMMMKKKCCMMMMMMMMMCCCCCCCCYYYYYYYCCCRRRRRRRR 8
output:
No
result:
ok single line: 'No'
Test #68:
score: 0
Accepted
time: 1ms
memory: 3752kb
input:
RRRRRRRRRRRRYYYYGGGYYYYYYYYYYYGGGGGGYMMMMMMMMMMMYYYYYYYYYYYKKKKKKKKKYYYKKKKKKKKKKYYYYYYYRRRRRRRRRRRYMMMMMMMMMMYRRYYYYYYYYKKKKKKKKKKKYRRGGGGGGGGGRRBBBMMMMMMMMMBCCCCCBBBBBBBBBBCCCYYYYYYYYYYYCBBBBBB 10
output:
No
result:
ok single line: 'No'
Test #69:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
GCCCCCCCCCCBBBBBBBBBBBBBBBCCCCCYYGGGGGGGGGGGGGYGGGGGGGGGGGGGGGYYMMMMMMMMMMMMMMMYYYYYYYYYYYYGGYYYYYYYYYYYYGGGGGGGKKKKKKYYYYYYYYYYYYYYYKKCCCCBBBBBBBBBBBBBBCCCCCCCCCCKKKKKKKGKKKKKKKKKKKKKKKGGGGGGG 15
output:
No
result:
ok single line: 'No'
Test #70:
score: 0
Accepted
time: 0ms
memory: 3900kb
input:
CCCBBBBBBMMMKKKKKGGGGGGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKMMMMMMMMMMMMMMMMMBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCMMMMMKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGKMMMMMMMMMMMMMM 20
output:
No
result:
ok single line: 'No'
Test #71:
score: 0
Accepted
time: 0ms
memory: 3512kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 5
output:
No
result:
ok single line: 'No'
Test #72:
score: 0
Accepted
time: 2ms
memory: 5888kb
input:
CCCGRRRGGRRYYYRMMRRMMMBBBBGGGMRCCCCCCRRRCBBBBMBBBCCCCGGGGCCBBBBCGGGRRRRCCCYYYYYYYKCCCCKKKGCCCRCYRRRRYYYRRRRYYYRRRCYYYRRRRYYYCCCMMMMYRKKKYYYKRYYYYRRKKKCRYYYCCCCRMMMMKKKCCCRRRMMMMBBBBKKKKKRRRRMMMRKKKKRR 3
output:
Yes
result:
ok single line: 'Yes'
Test #73:
score: 0
Accepted
time: 1ms
memory: 5776kb
input:
CCCCCCRRRRRBYYYBBMMMMMMYGGGGGMMMMMGGGGGYYRKKKKRRRRYBBBBYMMMMMMCCKKKKKGGGGCCYBCCCCCGYYYYYYGGGGMMMCCCCCCCCCCCCRRRRRRBBBBCCCCMMBGGBBBBRRRRRRRRRBGCCCCCCKKKKKMMMMMBBBBBBBBBBKGYYYYKKKKKGMMMMMBCCGGGGGCKKKKKC 4
output:
Yes
result:
ok single line: 'Yes'
Test #74:
score: 0
Accepted
time: 1ms
memory: 5772kb
input:
YYYYYYYYYYYYYRYYYYYRMMCCCCCCCCCCCCCBBBBBBBCBBBBBBCCCCCCBGGGGGGGMMMCCCCCCRMMMMMKKKKKYYYYYYKRRRRRRKKKKKKKKKKKGGGGGMRRCKKKKKCRMMBBBBBBBMMMMMRCCCCCCCRRRCCCCCRRCCCCCCCCCCCCCKYYYYYKKKKKKCCCCCCCCCRRRRRRCC 5
output:
Yes
result:
ok single line: 'Yes'
Test #75:
score: 0
Accepted
time: 1ms
memory: 3824kb
input:
RRRRRRRRRGMRRKKKKKKGGGGGGGGKKRRRRRRRMMGMMMMMMMMRRRRRRRMGGGGGGGMMCCGMMMMMMMMMMMMMMMMGGGGMMMMMMGCCCCMCCCCCCCCCCCCGGGGGGGCCRRRRRGGGGGGRRRCCCCGCCCGGKKKKKKKKKKKKKKKMMMMMMMKGGGRRRRGGGGGGGGRRBBBBBBBBG 6
output:
Yes
result:
ok single line: 'Yes'
Test #76:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
MGGGGGGGGGGCRRRRRRRRRRRRRRRRRRRRRCCCCCCCCCCCCCMMMMMMMMMCCCCCCCCCCMMMMMKKYGGMMMMMMMMMMMMMMMMMMMMMGGGGGKKKKKKKKGGGYYYYYKKKKKKKKKRRRRRRRRRRKKYYYYYYKKKKKKKKKYYYYYYYYYYYYYYYYYYYYYYKMBBBBBBBBBBBBBBBBBBBMMMM 8
output:
Yes
result:
ok single line: 'Yes'
Test #77:
score: 0
Accepted
time: 1ms
memory: 5712kb
input:
CCCCCBBBBBBBBBBBBBBCCGGGGGGGGGGCCCGYYYYYYYBBBBBBBBBMMMMMMMMMMBBBBYYYYGCBBBBBBBBBBBGGGGGGGGGGGBCCCCCCCCCCCCCCGGRRRKKKKKKKKKKKKRRRRRRRGGGGGGGGGGGGGGGGGCCCCCRRRRRRRRRRCCCCCCCCCCCCCCCCCCCCCGG 10
output:
Yes
result:
ok single line: 'Yes'
Test #78:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
CCCGGCCCGGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCCCGGGGGGGGKKKKKKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCCCCKGGGGGGGCCCCCKKKKKKKKKKKKKKKKKCCCMMMMMMMMMMMMYYYYYYYYYYYYYYYMMMMMMMMGGGGGKKKKKKKKKKKKKKKGGGGGGGGGGGMCCCCCC 15
output:
Yes
result:
ok single line: 'Yes'
Test #79:
score: 0
Accepted
time: 0ms
memory: 3808kb
input:
CRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKKKKKKKKKKMRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKRRRRCCCCCCCCCCCCGGGGGGGGGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCC 20
output:
Yes
result:
ok single line: 'Yes'
Test #80:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
KKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKK 25
output:
Yes
result:
ok single line: 'Yes'
Test #81:
score: 0
Accepted
time: 15ms
memory: 5744kb
input:
MKKGGGCGGGMMGMMYYYYGYYRRRRYCCYGGGMMCRRRCCKKCKRRKCRRRRCKKKRKKBBBYYYRGGGGGRRMMMMRBBRMMRRRKKKRRRRRRRRRGBBGRRGKKKCCCGGGGYYCBBKKYYYBYBBRRBBBBKGKKKRKKKRGGGGGGGCCCCYYYYGKKKKRRKCCCMMMMGGRRMKMMMKRYGGGGYRRYKCCCMCKKKKCCCRCCCRRGGRCCCCMMKMMMMKGGYBBYRRMMMYYMYYYRRRYYYCCYBYYBBBBYYGGGGYBBMMCCCCMRGGGGKKGRRMMYGGMMMMMM 3
output:
No
result:
ok single line: 'No'
Test #82:
score: 0
Accepted
time: 9ms
memory: 6140kb
input:
GMKKKKMMGBBKKKKKBBBBBBBBYYYBBBRRRBCCCBCGGGGRRYYYRKYYRRRRYYYKKKRRRYYYRKMMMBBBBCCMMMMMMMBBBBBMBBBBBMMMMBBBCCBBBCBCCKKKKKKKKBCCCCCBGGKKKGGGYMMGGGGGMMYYKKKYCCCCCCKKKYYYYCCRRRRYMRRRGGMBBMMMMBBBMMMGMMKRRRRKKRRRCYYYYCCCYCCKBKKKKBBCBBGBBBRRRRRBBCCCGGGRRMMYYYMMMMYYMCCCCMRRGMBBBBBBBMMBCCCYRYCCCCCCYYYYRRRRYY 4
output:
No
result:
ok single line: 'No'
Test #83:
score: 0
Accepted
time: 4ms
memory: 5940kb
input:
CRRRRRYYYYMMMMMMYYYYYYYYRRRRRRRRRRRRRBBBBRRRRRYYYYMMMMYCCBKBBBBBBKCKKKKCCCKKKYYYYGGGGKCKKKKKKCCCRRRRRRRBBBBCCCCGGGGGBBRBBBBBBBCMMMCCCCCCCCCCBBBBBMBBBBBMMMMGGGGGMMCCCCRBBKKKYYGGGGGYYKKKBBBBCCCCCCRRCCCCCRGGYYYYYGGGGGGGGYYMMMMMRKKKKKKRRRRMMMMGGGGGGMMCCCCMBBBBBBYBBBBBGGGBBBBBBGGBBBBBGYYRCBBBBCYYYYYY 5
output:
No
result:
ok single line: 'No'
Test #84:
score: 0
Accepted
time: 2ms
memory: 5640kb
input:
BBBBBBGGGGGGGBBBBBBBBBBBBBMCGRRRRRGGKKKKKKGGGCCMMMMMMMCKKKKRRRRRKCCYYYYYYYCCCCCCGGYYYYYKKKKKKYGBBBBBBBKKKKKKKBBBYYYYYBBGGBBBBMMMMMBBBGGGBBBBBBBGGGGGGGGGGGGGGGGGGGMGGGGGMYYYYYYMMMMRRRRCCCCCRRRRRRRRRRRRRRRMMMBBBKKKKKKGGGGGBBBBBBKKKKKKKGBGGCCCCCCCGGGGGBBCCCYYYYYYYCCCBBBBGGGGGGMMCCCCCCMMMMMBBMMCCCCCCC 6
output:
No
result:
ok single line: 'No'
Test #85:
score: 0
Accepted
time: 1ms
memory: 4032kb
input:
YYYYYGGGGGGGYKKKKKKKKYKKKKKKKYYRRRRRRRCCCCCCCCCCCCCCCCCCGMMMMMMMKKKKKKKKRGGGCCCCCCCCGGGGGGGGGGGGGGGGGGGGRKKKKKKKMMMMMMMMMMMMMMMMKKRRRRBBBBBBBBRKKKKKBBBBBBBBBBBBBBKRRRMMMMMMMMRRRRRKKGGGGGGGGGGGGGGGGGGGGKKKKKCCCCCCCCKKKKKKKKKKKMGGGGGGGCCCCCCCGGMMMMMMGGGGGKKKKKKKKKGGRRRRRRRRRGMMMMMMMYYBBBBBBBBBYYYYYYMG 8
output:
No
result:
ok single line: 'No'
Test #86:
score: 0
Accepted
time: 1ms
memory: 3760kb
input:
RRRCCCCCCRRRRRRRRRKKKKKKKKKKKRRCCCRBBBBBBBBBMMMMMMMMMRRRRRRCCCCMMMYYYYYYYYYMMMMMMYYYYYYYYYYYMMMMMMMMMMMMCCCCCKKKKKKBBBBBBBBBYYYMMMMMMMMMMMYYYYYYYMMMMMMGGGGGGGGGMMMMBBKKKCRRYYYYYYRRRRRRRRRBBBBBBBBBYYYYRRKKKKKKMMMMMMMMMMMKKBBBMYYYYYYYYYYYMMKKKKKKKKKMMMMMMMRRRRRRRRRBBBBBBBBBBBBBBBBBBKKKRRRRRRR 10
output:
No
result:
ok single line: 'No'
Test #87:
score: 0
Accepted
time: 0ms
memory: 3932kb
input:
CCCCCCCCGGGGGGGGGGGGGGGGCCCCMMMMMMMMMMMMMMMMCCCCCCCCCCCKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCMMMMMMMMMMMMMMMMCCCCCCCCGGGGGGGGGCCCCCCCCCCCCCCCGGGGGGCCCCCCCCCCCCCCKKKKKKKRRRRMMMMMMMMMMMMMMMRRRRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCKKKC 15
output:
Yes
result:
ok single line: 'Yes'
Test #88:
score: 0
Accepted
time: 0ms
memory: 3928kb
input:
MMMMMMMMMMRRRRRRGGGGGGGGGGGGGGGGGGGRRRRRRRRRRMMMMMMYYYYYBBBBBBBBBBBBBBBBBBBBYYYYYYYYYYYYMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMYYYYMMMMMMMMMMMMMMRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGYYYYYYYYYYYYYYYYYYYYYBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMM 20
output:
No
result:
ok single line: 'No'
Test #89:
score: 0
Accepted
time: 1ms
memory: 5940kb
input:
YYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBYYYYYGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGGGGGGGGGGYYYYYYYYYYYYYYMMMMMMMMMMMMMMMMMMRRRRRRRRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMYYYYYYGGGGGGGGGGBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGYYY 30
output:
No
result:
ok single line: 'No'
Test #90:
score: 0
Accepted
time: 428ms
memory: 11232kb
input:
RBMKYGCGBRYMCKBCMRGYKGMKCBYRGRKYCBMKBMGCYRGYMCRKBGKMBCYRYMRBKGCKGBMRYCGMBKYRCGCMBRKYCGYBKMRBRKYGCMBGMCYKRCYKMBGRBYRMGKCRGBKYCMBMGRYCKMRCBYGKRMGKYBCKBRYCMGMCRBKGYMRKCGBYGYCMBRKGBRMYKCRGKMBCYKRGBCMYMGYCRKBYCBKGRMBGYKRMCRMCYKBGRKCGMYBCBKYMRGKGYMRBCRKBGYCMYRGBMCKBKGYMRCKMGBRYCMKYRGBCMBCGKYRYGMBKRCBCGRMK...
output:
No
result:
ok single line: 'No'
Test #91:
score: 0
Accepted
time: 362ms
memory: 11332kb
input:
RMGCKYBKGBCYMRYGBKRCMBGMCYRKMBCKGRYBMGCKYRBYCMRKGBMKRGYCBMKRGYCKYGBCMRYGCBRKMCGBMYRKRKBYCGMCMRKYGBCBRMKYGBKRCMYGRCGBYKMKMRGCYBRKBMYGCMRYBGCKRYCGMBKMCRBKYGYRCBGMKGRCYBKMRMKYCBGYKCBRGMYGCRMBKMYBCKGRBKYMRCGRYMBCGKRBMGYKCKMBCRGYKCBMGRYGMCRYBKGMCRYKBMYKRGBCBGRMYKCMGYBKCRGBCRMYKMCRKYBGBKYCRMGCRBGYMKBGKRMC...
output:
Yes
result:
ok single line: 'Yes'
Test #92:
score: 0
Accepted
time: 227ms
memory: 10636kb
input:
CBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYK...
output:
No
result:
ok single line: 'No'
Test #93:
score: 0
Accepted
time: 232ms
memory: 11416kb
input:
CBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYK...
output:
Yes
result:
ok single line: 'Yes'
Test #94:
score: 0
Accepted
time: 181ms
memory: 8940kb
input:
MCCBBGRRKKYMCBGRKYYMMCBBGRRKYYMCBGGRKYYMCCBGGRRKYYMCBGGRRKYYMMCCBBGRRKKYYMCBBGRRKYMCBBGGRRKKYMMCCBGGRKYMMCBBGRRKYMCCBBGGRRKYMMCCBGRKKYYMMCCBBGRKYMMCCBBGGRKYYMMCCBBGRRKYMCCBGGRKKYYMCBGRKKYMMCBBGGRKKYMCCBGRRKYMMCBBGGRKYMCBGGRKKYMMCBGGRRKKYMMCCBBGGRRKKRGBCMYYKRGBBCCMYYKRRGBBCCMMYYKKRRGBCCMYYKKRGGBBCMMY...
output:
Yes
result:
ok single line: 'Yes'
Test #95:
score: 0
Accepted
time: 179ms
memory: 9000kb
input:
CBBGGRKKYMCBGRKKYYMMCBBGRKKYYMCBBGGRKKYMMCBBGRKYMCBGGRKYYMMCCBBGGRRKKYMCCBBGRRKKYMMCCBGRRKKYYMCCBGGRKKYMMCCBGGRKYYMMCBBGGRKYMMCBGGRRKYYMCCBBGRRKYYMMCBBGRKKYMMCCBGGRKKYMCBGGRRKKYYMCBBGGRRKYMMCCBBGRKYMMCCBGRRKKYYMMCCBGRKKYYMCBBGRRKYMMCCBGRRKYYMCBGRRKKRGGBBCCMMYKKRGGBBCMYYKKRGGBCCMMYKRRGGBBCMYKRGGBBCMY...
output:
No
result:
ok single line: 'No'