QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#718578 | #2513. A Color Game | yuto1115# | AC ✓ | 237ms | 25460kb | C++20 | 1.4kb | 2024-11-06 20:53:51 | 2024-11-06 20:53:51 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
#define rep2(i,j,k) for(ll i = ll(j); i < ll(k); i++)
#define rep(i,k) rep2(i,0,k)
#define rrep2(i,j,k) for(ll i = ll(j)-1; i >= ll(k); i--)
#define rrep(i,k) rrep2(i,k,0)
#define all(a) a.begin(), a.end()
#define SZ(a) ll(a.size())
#define eb emplace_back
using ll = long long;
using P = pair<ll,ll>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vp = vector<P>;
using vvp = vector<vp>;
const ll inf = LLONG_MAX/4;
bool chmin(auto& a, auto b) {return a > b ? a = b, 1 : 0; }
bool chmax(auto& a, auto b) {return a < b ? a = b, 1 : 0; }
int main(){
cin.tie(0)->sync_with_stdio(0);
string s; cin >> s;
ll n = SZ(s);
ll m; cin >> m;
string t = "RGBCMYK";
vl a(n);
rep(i,n){
rep(j,SZ(t)){
if(s[i] == t[j]) a[i] = j;
}
}
ll d = SZ(t);
vector<vvl> dp(n+1, vvl(n+1, vl(d, -inf)));
rep(i,n+1) dp[i][i] = vl(d, 0);
rep2(w,1,n+1){
rep(l,n){
ll r = l+w;
if(r > n) break;
rep2(i,l+1,r){
rep(j,d) chmax(dp[l][r][j], dp[l][i][j] + dp[i][r][j]);
}
chmax(dp[l][r][a[l]], dp[l+1][r][a[l]]+1);
chmax(dp[l][r][a[r-1]], dp[l][r-1][a[r-1]]+1);
bool flag = false;
rep(j,d){
if(dp[l][r][j] >= m){
flag = true;
}
}
rep(j,d){
if(flag) chmax(dp[l][r][j], 0ll);
}
}
}
bool flag = false;
rep(j,d){
if(dp[0][n][j] >= m || dp[0][n][j] == 0) flag = true;
}
string ans = "No";
if(flag) ans = "Yes";
cout << ans << endl;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3612kb
input:
BBBRRRRRRGGGB 3
output:
Yes
result:
ok single line: 'Yes'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
BBBRRRRRRGGGB 4
output:
No
result:
ok single line: 'No'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3836kb
input:
RRRRGGGRRRRRG 3
output:
Yes
result:
ok single line: 'Yes'
Test #4:
score: 0
Accepted
time: 45ms
memory: 11656kb
input:
GMYCGMRMGYMRMKCBKBMKKBMMKBBKMBMRRMGYKKMBKMYRGGBMRMKKKBRCMKYCCKYGYYKKCKRCYGGKGRBCKMYMRCRGBRRYCCKKRRKRCKMMMGCCGYYKMCRGMKCYBMRRKYYRRKGGRBMCKGBBYYGGGBBYBBRCCMGKKGRGRMRRBRCYGGGKBRKCBYCKMMBRCGKCCYYMMCKGRBYRRGBBCGYKBBMKRBBKGCRBYCKMYKMCKMBRMGGYBKBRBMYGGCKYCMYKBRCCGCYRRRKCKCBKCMCYBKRBKMCCYRBKBGGMGMCBGMBMYCCK 1
output:
Yes
result:
ok single line: 'Yes'
Test #5:
score: 0
Accepted
time: 50ms
memory: 11592kb
input:
KKCCCCCKYYYYYYKKKCRRCCBBBGGMMGCKKBBBBBRCCRRCRRYYCCYYBGGGBKKKBKKKCMKKMCCCGGGCCCCBBBCCKMMMKCCYYBBCCCCCCCCCYYCCCCBMMBRRRBBGGMKKBYMMMYYBBBBYYYYKCCCMMCKKMMMKKGGMBBRRBBBBKKBBBMMMMKKMMMKKKMMYYGMYYYMRRBMMMBGRRGGMMCCGRRBBBGCGGGCBBBCCBGGGGCRKKBBBRRYYYBBBYYKKKYYYBBYYBBBBCCCRKYGGGYYKKKKKKKKKRCCCYKKRRRKKMMMKMMC 2
output:
Yes
result:
ok single line: 'Yes'
Test #6:
score: 0
Accepted
time: 48ms
memory: 11316kb
input:
BYCCCYYBMMMMMMMMGYYYBBBYGBBBGGGKKKKKKGGGKKKBBBBKKBBBYYGGGGYGGGMGGGGMCMCCCMMMYYYYYYYYYYYCCCGGGCCRRRCRRBBBBRCCCCCGYCCCCCCYYCCCGGMGGRRRBCCCBMMMMBRCCCCGYYYGRYYYRRMMMMMRRRRMCBBGGGBBGYYYGGGCCGGGGMMBBGGRRRRGBRRRRYYYYBCCCYCCKKKMMMMCCYGGGYCBBBYYYYCCCCYCCCMMMMYYCBBBBBBBCCCCCGGGGCCCGGGGCCBBBBBGGGGMMMBKKKKMMM 3
output:
Yes
result:
ok single line: 'Yes'
Test #7:
score: 0
Accepted
time: 45ms
memory: 11180kb
input:
RMMMRRRRRRMMMMMMMMMMMMMGGGGBBBBMYYYRRRRRRYYMMGGGGMMMYMMRRRKKKKYYYYYYMMMMMMRRRRRKRKKRKKKKRRRKYYYKKKKYKCCCMMKKKKKMMMCKRRRKKKKRRRRRMMMGGGGGGMMMRCCCCYYYYCCCBBBBCCYCCCCCYYYYRRYYYYRRRRRRRRRRRRRBBBKKKKBRRRRBRRRBBBBBGGGGGGBYGGGGGGYKRBBBBBBRRRCCCCCCCCCRRRRRRRRKCCCCKYYYYKKKMMMMKKKBBMMMMBBBBBBBBKKKKKKRRRR 4
output:
Yes
result:
ok single line: 'Yes'
Test #8:
score: 0
Accepted
time: 49ms
memory: 11052kb
input:
BBKKKKKBBBCCCKKKKKKKKKKKKKCCKGGGGGGGCCCCCCMMMMMMMRRRRRRRRRYYKKKKKKYYYRRRRRKKKKKCBBBBBBBBBBRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBGGGGGGBBBRRRRMMMMMRMMYYYYYYBBBBMMMMMBBYMMMKGGGGGGGKKKKMGGRRRRRRGGGGRRRRRRRYYYKKKBBBBBBKKKCCCCCCKBBBBBBYBBBBBBBBBBBBBBYYBBBBBBBBBBBYYCCCCCYBBBBBBYRRRRRRYMMMMMMGGGGGGGMMMMMYY 5
output:
Yes
result:
ok single line: 'Yes'
Test #9:
score: 0
Accepted
time: 53ms
memory: 11592kb
input:
BBMMCCCCCCCCCMMMMKKKKKKMMMBCCYMMMMMCYYYYYYYCCCCCMMMMMMMYYYYMMMMCCCYYYYYYYYYCCCCMMMMMMMMCCMMMYCCCCCBBBBBBBBBRRRRRRRRBMMMMMMMGGGGGGGGGGGGGGGGGMMMMMMMMMMGGGGBBBBBBBCCCCCCBBGGCCCCCCMMMCCCCCCCCKKKKKKKCMMMBBCMMMMMMMMCCCBBBKKKKGGGGGGKKKKKBBBBCCCCMMMMMMRRRRRRGGGGRRRRRRRGKKKKKKKKKKKKKKKKKKKKKKMMMMMMMMKKGGGG 6
output:
Yes
result:
ok single line: 'Yes'
Test #10:
score: 0
Accepted
time: 45ms
memory: 11096kb
input:
GGGGGGGGGGGGGGGGRRRRRRRRCCCCYMMMMMMMMCCCCCCCCCCMMMMMMMMMMMMMYYMMMMBBBBBBBBMMMMMYMGGGGGGGGGGGGGGGGGGGGGMMMMMMMMMMMMBBBBBGGGGGGGGGGBBBBBBMMMMKKKKKRRRRRRRRRRRKKKKMMMMMMMYYYYYYYYYYKKKKKKKKKYYYYYBBCKKKGGGGGGGGGGGGKKKKKCCCCMMMMMMMMMMCCCCCBMMMMMMMMMMMBBBBBBBYMMMMMMMMMMMMYYYYYYYYYYYYCGGGGGGGGGGCCCCGG 8
output:
Yes
result:
ok single line: 'Yes'
Test #11:
score: 0
Accepted
time: 42ms
memory: 10864kb
input:
MMMMMMMMMMMMMCCCCCCCCCCCGGGGGGGGGGGGGGGGGGGCCCCCCCCCMMMMKKBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCMMMRRRRRRRRRBBBKKKKKKKKKKKKKKKCCCCCCCCCCCCCRRRRRRRRRRRRRRRRRRCCCCCCCCKKKKKKKMKKKKKKKKKKYYYYYYYYYYYYYYYYYYKKKKKKKKKMM 16
output:
Yes
result:
ok single line: 'Yes'
Test #12:
score: 0
Accepted
time: 50ms
memory: 11276kb
input:
GGGGMMMMMMMMMMMMMMMMMMMMMMMMMMRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYMMMMMMMMMMGGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGG 30
output:
Yes
result:
ok single line: 'Yes'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
RGB 1
output:
Yes
result:
ok single line: 'Yes'
Test #14:
score: 0
Accepted
time: 2ms
memory: 4308kb
input:
BBRBBBRBRBBBRRBBRRBBRRRRBBRRBBRRBRRRRRRBRRRRBBBRBRBBBRRBBRRBBRRRRBBRRBBRRBRRRBBBRRRBRRRBB 4
output:
Yes
result:
ok single line: 'Yes'
Test #15:
score: 0
Accepted
time: 13ms
memory: 7104kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 200
output:
Yes
result:
ok single line: 'Yes'
Test #16:
score: 0
Accepted
time: 9ms
memory: 7044kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 300
output:
No
result:
ok single line: 'No'
Test #17:
score: 0
Accepted
time: 1ms
memory: 3744kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 3
output:
Yes
result:
ok single line: 'Yes'
Test #18:
score: 0
Accepted
time: 49ms
memory: 11428kb
input:
GCGRRRRRGCCBKMMBBYYYYYKRCCCMCCGCCGGGRGGBRRRBRMMMYCCYRKMRRRRRCRMMMCCCMCRRCGGCMMMKKMMCKKMCMKMCYKCCCCKBKKKKMKKKBBBBBRYKKBBGGGYYRRCBBCYYKKKKKKYMYYCKYKKCCYYYBCCCMCGMGGGRGRRKRGGKGMGKBKGGBRMMMKGKGKRRBBKKKGGRRRRGBBKKKRRRKRMMMMRGGGYGCCCCRCMKKKCGRRRGBBYMCCCMRBBCCGBBGBBRMMKKRYYYYYKKKKYYYRRYGKRMMMYYRCCCYYYCMMMR 2
output:
No
result:
ok single line: 'No'
Test #19:
score: 0
Accepted
time: 115ms
memory: 17484kb
input:
BBKKYGGGGYKKKKKCCGGCKKKMMBRRRBBBBBKKKKRRRRBYYBBBBMBBBMYCMMMMBBBCCYCCCYYYYMMCCCBBGGGRRGGGRRBMMMMRRRRMYYYYKKMCCCCMKMMMMKKMKGGCCCCBBCYYYCGGCCCCCYYYYCRRRRRRRRRRRRRRRMRYYYRRMBBBBKGGBBBBMGRRRRYBBYYYGGKKKKCCCMRYGGKGGGGKKKKKYGMMMGGBBBBBBBBGGGGGGMMMGGYBBBBRMCRRRRRYYYYBRYYYKKKKKRRYYYYRRRRBBRYYYBBBCCCYYYYYYMMY...
output:
No
result:
ok single line: 'No'
Test #20:
score: 0
Accepted
time: 227ms
memory: 25012kb
input:
BCCCCYYYYBBYMMMMBBBGGMGGGMMGGGKKKGGGGGGGGGYYYYMYYYRRCCCKYYYYYKKRRRRKKKRRRRRRRRRGGGRMMMMRRCRRRRRCCMMMMCCCCCCCCCGGGRRCCCCCRRRBBBRRGGMMMGGGRRBRMMCCCCMMRKKKKKBBBBBKRBBCCCCCCCCRRRRMMMMMMMMGYYYGGRRRRGGGGRRRCCBBRRRCMMMMMMMMGGGBBBBCCCCMMMMMBYYMMMYBBYYYYBBBBGGGGMMMMMMGBBKKKRRRYYYBBBYRRKBGRKKKKKKKKKKRRRRCMKKK...
output:
No
result:
ok single line: 'No'
Test #21:
score: 0
Accepted
time: 227ms
memory: 25164kb
input:
BGGGGGGMRRRRRRRRRRMMMMMBMMMMCCCCCCYYMMMMYYBBBBBGKKKKKKGGGGBRRRRBBMMMMMMBGGGGGBYYYCCCCCYBBBGRBBBBBRRMMMMMMRRRRRMMMMRRGGGGCBBBBBKKKKKKCCCCCCCCCRBBBGGGGGYYYYBGGGGYYYYRGGGGGYCCCCYYYYYRRKKRRRRRBBBBBBKKKKYYYYRGKKBMMMMBBBBBRRRRRRKKGGGGRRRRRYKKKKKYRRRRRMMMMRRRRBBBBBMMRRRRRRRBBBBBYYYYYCCCCCBBBBBBKCCCCKKKYYYG...
output:
No
result:
ok single line: 'No'
Test #22:
score: 0
Accepted
time: 219ms
memory: 24976kb
input:
BBBBMMMMMBBMYYYYYMMCCCCCMMMKKKKYYYYYYKKGGGGGMMRRBBBBBBRRRRRCBBBBBBBCCCCRRYYYYYYYRRRRYYYYYYGGRRRRRRRRRRRCCCCCCGGGRRKKYYYYYKKCCCCCKRRRRMRRGGGGGGGRMMMMMMMRGGGGYYKKKKKRRRRRKYYYYGGMMMMMMMMMMMMMGCBBBBBBBBBBBBBCGGGGGYYYYYYYCCCCCRRRRRGGGGGGGYYYYYYYCYYYYYCKKKKKKKKKCCCCCCKKCGGGGGGGMMKKKCCCCCCCKKCCCCCKBMMMMMGG...
output:
No
result:
ok single line: 'No'
Test #23:
score: 0
Accepted
time: 212ms
memory: 24768kb
input:
BBBBBBBRRRRRRRRRRRBMMMMMMMMMBBBBGGGGGMMMMMMMMMMMGGRYYYYYGGGMMMMMMMMMMGGGGGGYKKKKKKKKKKKYYYYYCCCCCBKBBBBBBBBBBBKKKGGGGMMMMMMMMMGGGGGGGKKKKKBBBBBBBBCGGGGGGGGGCCCCRRRCCCCCYYYYYYYYYYYCCCCCCCCCCCCCCCCCCYYYYYYYYYYCCCRRRRRRRRRRCCCCCCCCCCCCCCBBBBBBBBBRRRRRRRRRRRRRYYYYYYYYYMMMMMMMMMMYRRRRRRRRRRRRRMGGGGGGGGGG...
output:
No
result:
ok single line: 'No'
Test #24:
score: 0
Accepted
time: 233ms
memory: 24716kb
input:
MMGGGGGGGGGGGGGGGGGGGMMMMMMMYYYGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGYYYYYYYYYYYYYYYYMGGGGGGGGGGGGGGGGGGGCCCCCCYYYYYYYYYYYYYKKKKKKKKKKKKKKKKKKKKKYYYYYCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCYCCCCCCCCCCCYYYYYYYCCCCCCCCCCCCCKKKKKKKKKKKKKKKKKKKKCCCCCCCCYYYYYYYYYYRRRRRRRRRRRRRRRRRCCCCCCCCCCCCCCCCCCCC...
output:
No
result:
ok single line: 'No'
Test #25:
score: 0
Accepted
time: 224ms
memory: 25184kb
input:
MMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGKKKKKKKKKKKRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK...
output:
No
result:
ok single line: 'No'
Test #26:
score: 0
Accepted
time: 0ms
memory: 4016kb
input:
GRRRRRRGGGGGGGGGGGGGBBBGGRRRGGGGGGGGGGGRRRGGGBBBBB 3
output:
Yes
result:
ok single line: 'Yes'
Test #27:
score: 0
Accepted
time: 53ms
memory: 11588kb
input:
GGGGCCMMRRYRRRYYKKKKKBBKRRRYYYRYYYMMMYGCCCKYYYKKCCCGGGCBMMCCBCMMBBBKKKBBGGBKKKMYYKMMMKKKYYKKCCMMCRRRRRYKRRKBBBBRRCCRMMGGBBBKKBRGGRRRRYYRRRYRRKBBGGKRRRRKKKGYYYGYYRGCCCGGGCBMMMRRMMMMKKGGGKBBKBMMCBBBCKKCCBBBKKCGGYYYMMMYYCBMKKKKKMMBYGGBBBGBRRRRRBGCCCGMMGBBBYBBBBBBCCRBBBRCCCYYCBBMRRMCCCRRRBBBYRRRYYCYKKK 2
output:
Yes
result:
ok single line: 'Yes'
Test #28:
score: 0
Accepted
time: 125ms
memory: 17336kb
input:
MMMKKKKKKKKGGGGKBBBBKKKKBCBBBMMMGGGGMCCCCCCCCMMMGGGMCYYYYYYYCCCCBBBGGGBGGBBBYBBBBYYYGGCCCCCKKKKKKKKBBYYYYBBCCCBBBYYYYBGRRRKKMMMKKRGGCCCCCCBBBYYYGMRRRRMMGGGMMMMMMGGGCCCMMBBBBBRRRRBYYYYRYYCBBCCCYYYYCBBCCCKKKKCBMMMKKBBBKKBRRYYYYRBBGYYYYGRRRRRRRRGGBKKKKMMMMMMMBBBBRRRKKKBCKKMMMMKKCCYYYBYYBBBMMRRRRMMYYCCC...
output:
Yes
result:
ok single line: 'Yes'
Test #29:
score: 0
Accepted
time: 224ms
memory: 25256kb
input:
CCCCCRRGGGCCMMGGGGGGMMMCCMMMMMGGGGGYYYYRRRRRRRRRRRRRRRGGMMMMMRYYBGGGGBBBBYYYYRRBBKKKKKKBBBKYYKBBBBBKKKYGGGGYKKKKYKKKRRRMMMMMRKKKKKRRYYYBBBBBBYYYKKKKKKRRRRRRYYYYKKGGGGGKBBMMKKKKKKMMBMMMMKKKKKKMYYYYBBMMMYYYYMMBKKYYYYYYYYYYYYYYYBBBBBBKCCCCKCRRRRCKKBBBBMMMMMMMMMMMMYYYYYYKKKKCCMMMYKYYYYKKKYYYYYRRRRMGGGGG...
output:
Yes
result:
ok single line: 'Yes'
Test #30:
score: 0
Accepted
time: 223ms
memory: 24892kb
input:
MYYYYYRRMMMMGGGGGGMYYYYYMMRYYYYYBBBBBBMMMMMRRRYMMMBBBRCCCCCKKKKKCCCCCCCRRRRRRRRRRCCCCCCCRRBBBBBBRRRCCCCCCRKKKYYYYYKKBBBRRMMMMMMMRRYYYYYYCCCGGGGGGCKKKKKKKKKKKKKKCCCCCCCCRKKKKKKMMBBCCCCCBBBBBBCBBBBRYYYYYYRRRRRBBBKKKGGGGGMMMMMGGKKKKBBGKKKKKGBBBBBBBGGGGKKCGGGGGCBBBBRRRRMMMMMRBCGGGGGGGGGCCCCBBBBBBCCCGGYY...
output:
Yes
result:
ok single line: 'Yes'
Test #31:
score: 0
Accepted
time: 229ms
memory: 24588kb
input:
CCMMMMMMCCRGRRRRRRKKKKKKKKRGRBBBBBBBBBBBBBBBBBRRRRRRRRRBRRRRRRRRRRRRRRGGMMMMGGGGGGGKKKKKCCCCCCBBBBBBBBBCKKKKGMMMMYMMMMMMMYYYYYYYYYYYYYYYYYYYYYGGGGBBBBBBBGGGYYYYYYYYYYMMMYYYYYYMMMMGGGKKKKKKKKKKKKKKGGRRRRYYYYYYKKKKKYYYYYYYYYKKYKKKKKKKBBBBBBBBBBBBBMMMMKGGGGGGGKMMMMMMBBBBBBBBMMMMMMMMMMMMMMMMKKKKKKKKKMMC...
output:
Yes
result:
ok single line: 'Yes'
Test #32:
score: 0
Accepted
time: 227ms
memory: 25248kb
input:
MGGGGGMMMMMMMKKKKKKKKKKKKMMMMMGGGGGGGGGGGGGGCCCCCCCCCCYYYYYYYYYYYYYYCGGKKKKKKKKKKKGGGGGGGGGCCCGMGGGGGGGGGGMMMMGGGGGGGGGGGGMMMKRRRRRRRRRRRRRRRKKKBBBBBBBBBBBBBKKKKKKKKKMMMRRRRRRRRRRRRRRRRRRRRRRBBBBBBGGGGGGGGGGGGGGGGGGGGGGGBBBBRRRRRGGGGGGGGGGGGGRRBBBBBBBBBBBBBRRRBBBBBBBBBBBBBBRRRRCCCCCCCCCRRRRRRRRRRRRR...
output:
Yes
result:
ok single line: 'Yes'
Test #33:
score: 0
Accepted
time: 225ms
memory: 24660kb
input:
CCCCCCCCCCCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMCCCCCMMMMMMMMMMMMMMMMMGGGGGGGGGGGGGGGGGGGGGGMMMMCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMRRRRRRKKKKKKKKMMMMMMRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKRRGGGGGGGGGGGGGGGGGGGGGGGGGGGRRRR...
output:
Yes
result:
ok single line: 'Yes'
Test #34:
score: 0
Accepted
time: 220ms
memory: 25248kb
input:
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBBBBBBBBBBBBBBBBBBBBBBB...
output:
Yes
result:
ok single line: 'Yes'
Test #35:
score: 0
Accepted
time: 1ms
memory: 4008kb
input:
GBBGGGBBBBBGGBBBBBBBBBBBBRRRRGGBBBRRRRRRRRRRRRRRR 4
output:
No
result:
ok single line: 'No'
Test #36:
score: 0
Accepted
time: 0ms
memory: 3756kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBGGGGGGBBRRRRBBBBBBBBRR 5
output:
Yes
result:
ok single line: 'Yes'
Test #37:
score: 0
Accepted
time: 1ms
memory: 3832kb
input:
GGBBBBBBBBBGGGGBBBBBBBGGGGGRRRRRRRRGGGGBBGGGGGGGGG 8
output:
Yes
result:
ok single line: 'Yes'
Test #38:
score: 0
Accepted
time: 1ms
memory: 3772kb
input:
RRRRRRGGGGGGGGGBBBBBBGRRRRRRRRRGGGGGGGGBBBBRRRRR 10
output:
No
result:
ok single line: 'No'
Test #39:
score: 0
Accepted
time: 1ms
memory: 3728kb
input:
RRRRRRRGGGGGGGRRBBBBBBBBBBBBBBBBBBBRRRRRBBBBBB 5
output:
Yes
result:
ok single line: 'Yes'
Test #40:
score: 0
Accepted
time: 1ms
memory: 3832kb
input:
GGGGKKMGGMMMYGGGKKKKKGCCCCYKKKGGYYGGGMRYYRRRYRMM 3
output:
No
result:
ok single line: 'No'
Test #41:
score: 0
Accepted
time: 1ms
memory: 3816kb
input:
YYYYYCKMMMMMYYYKKKKKKKKBBBCCCCKCCBBBCRRBBBBRRRCCC 4
output:
No
result:
ok single line: 'No'
Test #42:
score: 0
Accepted
time: 1ms
memory: 3744kb
input:
CMCCCCMMMCCCCCGCCCCCCCMMMMMKKKKKKCCCGGGGGMMMM 5
output:
No
result:
ok single line: 'No'
Test #43:
score: 0
Accepted
time: 1ms
memory: 3716kb
input:
KKKKKKYBBBBBBBBBBBBCCCCCCCCCCGGGGGGCCGGGGGGGCCYYYY 6
output:
No
result:
ok single line: 'No'
Test #44:
score: 0
Accepted
time: 1ms
memory: 4016kb
input:
GGGGGGYYYYYYYYYYYYYYYMMMMMMKKKKKKMMMMMMMMYYYYYYYYG 7
output:
No
result:
ok single line: 'No'
Test #45:
score: 0
Accepted
time: 1ms
memory: 3820kb
input:
BCCYYYYYYYYYCCCCCCCCCBBBBRRKKKKKKKKKKRRRRRRRBBBBBB 10
output:
No
result:
ok single line: 'No'
Test #46:
score: 0
Accepted
time: 1ms
memory: 3724kb
input:
YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYKKKKKKKKKKKKKKY 15
output:
No
result:
ok single line: 'No'
Test #47:
score: 0
Accepted
time: 1ms
memory: 3640kb
input:
YYYYYYYKKKKKKKKKKKKKKKKKKKKYYYYYYYYYYYYY 20
output:
Yes
result:
ok single line: 'Yes'
Test #48:
score: 0
Accepted
time: 1ms
memory: 4032kb
input:
GGGGGGGGRRRRRRRRRRRRRRRGGGGGGGGGGGGRRRRGGGGGGGGG 10
output:
Yes
result:
ok single line: 'Yes'
Test #49:
score: 0
Accepted
time: 1ms
memory: 4172kb
input:
GGCCCCGMGGGBRRRRKKGGGBGGGGBBBKKKKKBBBMMBKBBGKKKKKKKKMMYYYYMMMMMMMMMMMMYYRRRGGYM 3
output:
No
result:
ok single line: 'No'
Test #50:
score: 0
Accepted
time: 1ms
memory: 4080kb
input:
YYYGGGRRBGGGGGMCCCCCMMMMBBBBBMMYYYBBRRBBBBBCCCBBBBGGGGGGGGGGGMMMCCCCCCMMMMMCCG 4
output:
No
result:
ok single line: 'No'
Test #51:
score: 0
Accepted
time: 1ms
memory: 4132kb
input:
GGYYYYGGGCCCCCMMMMRRRRRRMCCCCCYYYYCGGGGGCCCKYYYYYYYKYYYYYKKKKKYYKKKGMMMYYYYYM 5
output:
No
result:
ok single line: 'No'
Test #52:
score: 0
Accepted
time: 1ms
memory: 4168kb
input:
KKGGGGGGKKBBBBBBKRKKKKKRRRRRRMMMMMMMKRRRRKKKKKKRYYYYYYRYYYYYYGKKKKKKKGGGGYCCCCCC 6
output:
No
result:
ok single line: 'No'
Test #53:
score: 0
Accepted
time: 1ms
memory: 4052kb
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: 5756kb
input:
YYMMMRRMMMRRBBYYYGCCCCCKMMCCCCKYYRRRRYYCCGGMMRMMMGGGCCGBBGRRGGGBBYMMMYYBBYYMMMMMMMYMMMMYRRRRCBYYYYBBRRBBRRBCCRRRRRRCCKKKKRRCGGCBKKKKRRBBBRRBBBRRRRCR 3
output:
No
result:
ok single line: 'No'
Test #56:
score: 0
Accepted
time: 5ms
memory: 5512kb
input:
MMMYYYYYYGGGGYYCGGGBBMGGKKKKGGMMMBGGGBGGGGYYYYYGBKYYYYYKKKBRRRRRBGGMMMMBYYYYBBCCCCCBBKKKYYYYKCCBBBBGGGCCKKKKCMRRRMKKKMMCCBBBMMMYGGRRRGGGBBBGGGGGKKKKKB 4
output:
No
result:
ok single line: 'No'
Test #57:
score: 0
Accepted
time: 5ms
memory: 5744kb
input:
MMCCCCCCMKKYCMMMMMCMMMCCCCCCMMCRMMMMMMRRRCCCCCCMMMMMCGGGGGGMMMMMMYYYYYMMMMMMMMMMMKKYYGGGGGGYYYYKKMRYCCCCCYYYYRRRRKMGGGGGMMMMMKMMMMRRRRMMMRRRRRYYYYYR 5
output:
No
result:
ok single line: 'No'
Test #58:
score: 0
Accepted
time: 5ms
memory: 5516kb
input:
MCCCMMMMMMMCCCCMMMMMMMMMMCMMMMRRRRRRKKCCCCCCCCCCCKKKKKRRRRRCMMMMMMMCYYYYYYCCCBBBBBMCGGRGGGYYYYYYYYYYYGGRRRGGGGGBBBBBGRGGGGCGGGGGBBBBBBCCCKKCCCCCCKKKKK 6
output:
No
result:
ok single line: 'No'
Test #59:
score: 0
Accepted
time: 5ms
memory: 5688kb
input:
RRMMMMMMMRRGGYYYYYYYYGGKKKKKKKKKKKKKKCCCCCCCCKRRRRRRRYYYYYYCCGGGGGGGGCCCCGGGGGGGGCYYRMMMMMMMCCCCCCCKKKKKKKKKGGYYYYYYYYGGGMMMMMMCCCCYYYYYYYCCCCCMRRR 8
output:
No
result:
ok single line: 'No'
Test #60:
score: 0
Accepted
time: 5ms
memory: 5528kb
input:
GGGYYYYYYYYYYGGBRRRRRCCCCCCKKKKKKKKKKCCCCCRRRRRRRRRRRKKKKKKKKKGGGGKKKKKKKKKGGGGGKKGGGGGGGGGGGRRBBBBBBBBBBRRRRRRRRCCCCCCCCCRRBBBBBBBBBBBBBBBBBBGGGGGG 10
output:
No
result:
ok single line: 'No'
Test #61:
score: 0
Accepted
time: 5ms
memory: 5452kb
input:
CCCCCCCCCCCCCMMMMMMKKKKKCCCCCCCCCCCCMMMCCGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMMMYYYYYYYYYYYYYYYMMCCCKKKKKKKKKKGGGGGGGGGGGGGGGMMMMMMMMMC 15
output:
No
result:
ok single line: 'No'
Test #62:
score: 0
Accepted
time: 0ms
memory: 3768kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 4
output:
Yes
result:
ok single line: 'Yes'
Test #63:
score: 0
Accepted
time: 9ms
memory: 7052kb
input:
KRMMRRRRGGGYYYGGGYMMMMMMMMKRKKKKKMMKYYYYKCCCRGGRGGGGGGRRRRKKRRRRYGGGGCCYYGRRGGCCCMMMMYYBBBBGGGCCCBKYYYKBBBRRRCCCRBCCCBKKBYYRRRYBBKKKBYYMMYBBYYYYYRRRYYYKMMMKKKKRRRRKKYYYRYMMGGMYYYYCCRMMMBBBBMBBBBGGGG 3
output:
No
result:
ok single line: 'No'
Test #64:
score: 0
Accepted
time: 10ms
memory: 7328kb
input:
CCCYYYCKKCCCCCRRRRYYYYYGGGCCCCCGBMYYYKKKKYBBBBBBGGGBGKKKKGGGGGGGMCCCCCMMYYYYYYYYYYMMKKKRRRRKMMMMKMMMMMYYYBCCCCCCCKKKCCCCCCCCBYYYYYBBBBBRYYYRKKKKBYYYYBBKYYYCCCKKRRRBBBYBBBBYYBCCCRRRRBBBBYBBMMMMYYYRKCCC 4
output:
No
result:
ok single line: 'No'
Test #65:
score: 0
Accepted
time: 12ms
memory: 6856kb
input:
KKKKKKKKKKCCCCCKMMMMMMRRKKKKKKRRKYYYYYKYRGGGGBKKKKMMMMMKBBBBBRRGGGGGRRRRRBBCCCCBBRRGGGGRYMMMCCYYYYYCCCCMMRRRRRMYBBBGBBBBBGGGGBBBCCCCCBRRRRRRRRRRBYBBBBBBYYYMMMMCCCCCMBRBBBBKKKKKKRRRYGGGGGYYCCCCKKK 5
output:
No
result:
ok single line: 'No'
Test #66:
score: 0
Accepted
time: 13ms
memory: 7000kb
input:
GCCCCCCCCCCCGYYYYYYGMMMMMGMMMMMMGGGGMMGCCCCCCCMMMMMGGGGMMRRRRRRRRKKYYYYYYKKMMMMMMKKKKKKKKRRRMMMCCCCCGGGGGGGGYYMMMMMYYYYYGKKKKKYYYYYYYGMMMKKKKKMMMMMMMRRRRRYYYYYYMMGGGBBBGGGGGGGBBGGGGGBKCCCCCKKRRRRRKKB 6
output:
No
result:
ok single line: 'No'
Test #67:
score: 0
Accepted
time: 13ms
memory: 6956kb
input:
CCCCCCCCGGGYYYYYYYGGGGGBBBBBCCCCCCCBGGGGGGGGBRRRRRRRRBCYYYYYGCCCCCCCCCGGGGGGGYYKKKKKKKKYBBBBBBMMMMMMMMBBYCKKKKKKMMMMMMMMKCBBBBBBBBKKRRRRRRRKKKKMMMMRRRRRRRRMMMMKKKCCMMMMMMMMMCCCCCCCCYYYYYYYCCCRRRRRRRR 8
output:
No
result:
ok single line: 'No'
Test #68:
score: 0
Accepted
time: 8ms
memory: 6860kb
input:
RRRRRRRRRRRRYYYYGGGYYYYYYYYYYYGGGGGGYMMMMMMMMMMMYYYYYYYYYYYKKKKKKKKKYYYKKKKKKKKKKYYYYYYYRRRRRRRRRRRYMMMMMMMMMMYRRYYYYYYYYKKKKKKKKKKKYRRGGGGGGGGGRRBBBMMMMMMMMMBCCCCCBBBBBBBBBBCCCYYYYYYYYYYYCBBBBBB 10
output:
No
result:
ok single line: 'No'
Test #69:
score: 0
Accepted
time: 7ms
memory: 6852kb
input:
GCCCCCCCCCCBBBBBBBBBBBBBBBCCCCCYYGGGGGGGGGGGGGYGGGGGGGGGGGGGGGYYMMMMMMMMMMMMMMMYYYYYYYYYYYYGGYYYYYYYYYYYYGGGGGGGKKKKKKYYYYYYYYYYYYYYYKKCCCCBBBBBBBBBBBBBBCCCCCCCCCCKKKKKKKGKKKKKKKKKKKKKKKGGGGGGG 15
output:
No
result:
ok single line: 'No'
Test #70:
score: 0
Accepted
time: 9ms
memory: 6732kb
input:
CCCBBBBBBMMMKKKKKGGGGGGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKMMMMMMMMMMMMMMMMMBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCMMMMMKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGKMMMMMMMMMMMMMM 20
output:
No
result:
ok single line: 'No'
Test #71:
score: 0
Accepted
time: 1ms
memory: 3800kb
input:
BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 5
output:
No
result:
ok single line: 'No'
Test #72:
score: 0
Accepted
time: 14ms
memory: 7032kb
input:
CCCGRRRGGRRYYYRMMRRMMMBBBBGGGMRCCCCCCRRRCBBBBMBBBCCCCGGGGCCBBBBCGGGRRRRCCCYYYYYYYKCCCCKKKGCCCRCYRRRRYYYRRRRYYYRRRCYYYRRRRYYYCCCMMMMYRKKKYYYKRYYYYRRKKKCRYYYCCCCRMMMMKKKCCCRRRMMMMBBBBKKKKKRRRRMMMRKKKKRR 3
output:
Yes
result:
ok single line: 'Yes'
Test #73:
score: 0
Accepted
time: 10ms
memory: 7032kb
input:
CCCCCCRRRRRBYYYBBMMMMMMYGGGGGMMMMMGGGGGYYRKKKKRRRRYBBBBYMMMMMMCCKKKKKGGGGCCYBCCCCCGYYYYYYGGGGMMMCCCCCCCCCCCCRRRRRRBBBBCCCCMMBGGBBBBRRRRRRRRRBGCCCCCCKKKKKMMMMMBBBBBBBBBBKGYYYYKKKKKGMMMMMBCCGGGGGCKKKKKC 4
output:
Yes
result:
ok single line: 'Yes'
Test #74:
score: 0
Accepted
time: 12ms
memory: 7184kb
input:
YYYYYYYYYYYYYRYYYYYRMMCCCCCCCCCCCCCBBBBBBBCBBBBBBCCCCCCBGGGGGGGMMMCCCCCCRMMMMMKKKKKYYYYYYKRRRRRRKKKKKKKKKKKGGGGGMRRCKKKKKCRMMBBBBBBBMMMMMRCCCCCCCRRRCCCCCRRCCCCCCCCCCCCCKYYYYYKKKKKKCCCCCCCCCRRRRRRCC 5
output:
Yes
result:
ok single line: 'Yes'
Test #75:
score: 0
Accepted
time: 11ms
memory: 7008kb
input:
RRRRRRRRRGMRRKKKKKKGGGGGGGGKKRRRRRRRMMGMMMMMMMMRRRRRRRMGGGGGGGMMCCGMMMMMMMMMMMMMMMMGGGGMMMMMMGCCCCMCCCCCCCCCCCCGGGGGGGCCRRRRRGGGGGGRRRCCCCGCCCGGKKKKKKKKKKKKKKKMMMMMMMKGGGRRRRGGGGGGGGRRBBBBBBBBG 6
output:
Yes
result:
ok single line: 'Yes'
Test #76:
score: 0
Accepted
time: 13ms
memory: 7116kb
input:
MGGGGGGGGGGCRRRRRRRRRRRRRRRRRRRRRCCCCCCCCCCCCCMMMMMMMMMCCCCCCCCCCMMMMMKKYGGMMMMMMMMMMMMMMMMMMMMMGGGGGKKKKKKKKGGGYYYYYKKKKKKKKKRRRRRRRRRRKKYYYYYYKKKKKKKKKYYYYYYYYYYYYYYYYYYYYYYKMBBBBBBBBBBBBBBBBBBBMMMM 8
output:
Yes
result:
ok single line: 'Yes'
Test #77:
score: 0
Accepted
time: 10ms
memory: 6652kb
input:
CCCCCBBBBBBBBBBBBBBCCGGGGGGGGGGCCCGYYYYYYYBBBBBBBBBMMMMMMMMMMBBBBYYYYGCBBBBBBBBBBBGGGGGGGGGGGBCCCCCCCCCCCCCCGGRRRKKKKKKKKKKKKRRRRRRRGGGGGGGGGGGGGGGGGCCCCCRRRRRRRRRRCCCCCCCCCCCCCCCCCCCCCGG 10
output:
Yes
result:
ok single line: 'Yes'
Test #78:
score: 0
Accepted
time: 8ms
memory: 7080kb
input:
CCCGGCCCGGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCCCGGGGGGGGKKKKKKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCCCCKGGGGGGGCCCCCKKKKKKKKKKKKKKKKKCCCMMMMMMMMMMMMYYYYYYYYYYYYYYYMMMMMMMMGGGGGKKKKKKKKKKKKKKKGGGGGGGGGGGMCCCCCC 15
output:
Yes
result:
ok single line: 'Yes'
Test #79:
score: 0
Accepted
time: 9ms
memory: 6464kb
input:
CRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKKKKKKKKKKMRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKRRRRCCCCCCCCCCCCGGGGGGGGGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCC 20
output:
Yes
result:
ok single line: 'Yes'
Test #80:
score: 0
Accepted
time: 7ms
memory: 6760kb
input:
KKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKK 25
output:
Yes
result:
ok single line: 'Yes'
Test #81:
score: 0
Accepted
time: 45ms
memory: 11372kb
input:
MKKGGGCGGGMMGMMYYYYGYYRRRRYCCYGGGMMCRRRCCKKCKRRKCRRRRCKKKRKKBBBYYYRGGGGGRRMMMMRBBRMMRRRKKKRRRRRRRRRGBBGRRGKKKCCCGGGGYYCBBKKYYYBYBBRRBBBBKGKKKRKKKRGGGGGGGCCCCYYYYGKKKKRRKCCCMMMMGGRRMKMMMKRYGGGGYRRYKCCCMCKKKKCCCRCCCRRGGRCCCCMMKMMMMKGGYBBYRRMMMYYMYYYRRRYYYCCYBYYBBBBYYGGGGYBBMMCCCCMRGGGGKKGRRMMYGGMMMMMM 3
output:
No
result:
ok single line: 'No'
Test #82:
score: 0
Accepted
time: 52ms
memory: 11512kb
input:
GMKKKKMMGBBKKKKKBBBBBBBBYYYBBBRRRBCCCBCGGGGRRYYYRKYYRRRRYYYKKKRRRYYYRKMMMBBBBCCMMMMMMMBBBBBMBBBBBMMMMBBBCCBBBCBCCKKKKKKKKBCCCCCBGGKKKGGGYMMGGGGGMMYYKKKYCCCCCCKKKYYYYCCRRRRYMRRRGGMBBMMMMBBBMMMGMMKRRRRKKRRRCYYYYCCCYCCKBKKKKBBCBBGBBBRRRRRBBCCCGGGRRMMYYYMMMMYYMCCCCMRRGMBBBBBBBMMBCCCYRYCCCCCCYYYYRRRRYY 4
output:
No
result:
ok single line: 'No'
Test #83:
score: 0
Accepted
time: 46ms
memory: 11152kb
input:
CRRRRRYYYYMMMMMMYYYYYYYYRRRRRRRRRRRRRBBBBRRRRRYYYYMMMMYCCBKBBBBBBKCKKKKCCCKKKYYYYGGGGKCKKKKKKCCCRRRRRRRBBBBCCCCGGGGGBBRBBBBBBBCMMMCCCCCCCCCCBBBBBMBBBBBMMMMGGGGGMMCCCCRBBKKKYYGGGGGYYKKKBBBBCCCCCCRRCCCCCRGGYYYYYGGGGGGGGYYMMMMMRKKKKKKRRRRMMMMGGGGGGMMCCCCMBBBBBBYBBBBBGGGBBBBBBGGBBBBBGYYRCBBBBCYYYYYY 5
output:
No
result:
ok single line: 'No'
Test #84:
score: 0
Accepted
time: 49ms
memory: 11320kb
input:
BBBBBBGGGGGGGBBBBBBBBBBBBBMCGRRRRRGGKKKKKKGGGCCMMMMMMMCKKKKRRRRRKCCYYYYYYYCCCCCCGGYYYYYKKKKKKYGBBBBBBBKKKKKKKBBBYYYYYBBGGBBBBMMMMMBBBGGGBBBBBBBGGGGGGGGGGGGGGGGGGGMGGGGGMYYYYYYMMMMRRRRCCCCCRRRRRRRRRRRRRRRMMMBBBKKKKKKGGGGGBBBBBBKKKKKKKGBGGCCCCCCCGGGGGBBCCCYYYYYYYCCCBBBBGGGGGGMMCCCCCCMMMMMBBMMCCCCCCC 6
output:
No
result:
ok single line: 'No'
Test #85:
score: 0
Accepted
time: 52ms
memory: 11384kb
input:
YYYYYGGGGGGGYKKKKKKKKYKKKKKKKYYRRRRRRRCCCCCCCCCCCCCCCCCCGMMMMMMMKKKKKKKKRGGGCCCCCCCCGGGGGGGGGGGGGGGGGGGGRKKKKKKKMMMMMMMMMMMMMMMMKKRRRRBBBBBBBBRKKKKKBBBBBBBBBBBBBBKRRRMMMMMMMMRRRRRKKGGGGGGGGGGGGGGGGGGGGKKKKKCCCCCCCCKKKKKKKKKKKMGGGGGGGCCCCCCCGGMMMMMMGGGGGKKKKKKKKKGGRRRRRRRRRGMMMMMMMYYBBBBBBBBBYYYYYYMG 8
output:
No
result:
ok single line: 'No'
Test #86:
score: 0
Accepted
time: 46ms
memory: 10964kb
input:
RRRCCCCCCRRRRRRRRRKKKKKKKKKKKRRCCCRBBBBBBBBBMMMMMMMMMRRRRRRCCCCMMMYYYYYYYYYMMMMMMYYYYYYYYYYYMMMMMMMMMMMMCCCCCKKKKKKBBBBBBBBBYYYMMMMMMMMMMMYYYYYYYMMMMMMGGGGGGGGGMMMMBBKKKCRRYYYYYYRRRRRRRRRBBBBBBBBBYYYYRRKKKKKKMMMMMMMMMMMKKBBBMYYYYYYYYYYYMMKKKKKKKKKMMMMMMMRRRRRRRRRBBBBBBBBBBBBBBBBBBKKKRRRRRRR 10
output:
No
result:
ok single line: 'No'
Test #87:
score: 0
Accepted
time: 39ms
memory: 10888kb
input:
CCCCCCCCGGGGGGGGGGGGGGGGCCCCMMMMMMMMMMMMMMMMCCCCCCCCCCCKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCMMMMMMMMMMMMMMMMCCCCCCCCGGGGGGGGGCCCCCCCCCCCCCCCGGGGGGCCCCCCCCCCCCCCKKKKKKKRRRRMMMMMMMMMMMMMMMRRRRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCKKKC 15
output:
Yes
result:
ok single line: 'Yes'
Test #88:
score: 0
Accepted
time: 47ms
memory: 11396kb
input:
MMMMMMMMMMRRRRRRGGGGGGGGGGGGGGGGGGGRRRRRRRRRRMMMMMMYYYYYBBBBBBBBBBBBBBBBBBBBYYYYYYYYYYYYMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMYYYYMMMMMMMMMMMMMMRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGYYYYYYYYYYYYYYYYYYYYYBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMM 20
output:
No
result:
ok single line: 'No'
Test #89:
score: 0
Accepted
time: 48ms
memory: 11288kb
input:
YYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBYYYYYGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGGGGGGGGGGYYYYYYYYYYYYYYMMMMMMMMMMMMMMMMMMRRRRRRRRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMYYYYYYGGGGGGGGGGBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGYYY 30
output:
No
result:
ok single line: 'No'
Test #90:
score: 0
Accepted
time: 224ms
memory: 25256kb
input:
RBMKYGCGBRYMCKBCMRGYKGMKCBYRGRKYCBMKBMGCYRGYMCRKBGKMBCYRYMRBKGCKGBMRYCGMBKYRCGCMBRKYCGYBKMRBRKYGCMBGMCYKRCYKMBGRBYRMGKCRGBKYCMBMGRYCKMRCBYGKRMGKYBCKBRYCMGMCRBKGYMRKCGBYGYCMBRKGBRMYKCRGKMBCYKRGBCMYMGYCRKBYCBKGRMBGYKRMCRMCYKBGRKCGMYBCBKYMRGKGYMRBCRKBGYCMYRGBMCKBKGYMRCKMGBRYCMKYRGBCMBCGKYRYGMBKRCBCGRMK...
output:
No
result:
ok single line: 'No'
Test #91:
score: 0
Accepted
time: 219ms
memory: 25236kb
input:
RMGCKYBKGBCYMRYGBKRCMBGMCYRKMBCKGRYBMGCKYRBYCMRKGBMKRGYCBMKRGYCKYGBCMRYGCBRKMCGBMYRKRKBYCGMCMRKYGBCBRMKYGBKRCMYGRCGBYKMKMRGCYBRKBMYGCMRYBGCKRYCGMBKMCRBKYGYRCBGMKGRCYBKMRMKYCBGYKCBRGMYGCRMBKMYBCKGRBKYMRCGRYMBCGKRBMGYKCKMBCRGYKCBMGRYGMCRYBKGMCRYKBMYKRGBCBGRMYKCMGYBKCRGBCRMYKMCRKYBGBKYCRMGCRBGYMKBGKRMC...
output:
Yes
result:
ok single line: 'Yes'
Test #92:
score: 0
Accepted
time: 237ms
memory: 25172kb
input:
CBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYK...
output:
No
result:
ok single line: 'No'
Test #93:
score: 0
Accepted
time: 218ms
memory: 25236kb
input:
CBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYK...
output:
Yes
result:
ok single line: 'Yes'
Test #94:
score: 0
Accepted
time: 219ms
memory: 25460kb
input:
MCCBBGRRKKYMCBGRKYYMMCBBGRRKYYMCBGGRKYYMCCBGGRRKYYMCBGGRRKYYMMCCBBGRRKKYYMCBBGRRKYMCBBGGRRKKYMMCCBGGRKYMMCBBGRRKYMCCBBGGRRKYMMCCBGRKKYYMMCCBBGRKYMMCCBBGGRKYYMMCCBBGRRKYMCCBGGRKKYYMCBGRKKYMMCBBGGRKKYMCCBGRRKYMMCBBGGRKYMCBGGRKKYMMCBGGRRKKYMMCCBBGGRRKKRGBCMYYKRGBBCCMYYKRRGBBCCMMYYKKRRGBCCMYYKKRGGBBCMMY...
output:
Yes
result:
ok single line: 'Yes'
Test #95:
score: 0
Accepted
time: 228ms
memory: 25004kb
input:
CBBGGRKKYMCBGRKKYYMMCBBGRKKYYMCBBGGRKKYMMCBBGRKYMCBGGRKYYMMCCBBGGRRKKYMCCBBGRRKKYMMCCBGRRKKYYMCCBGGRKKYMMCCBGGRKYYMMCBBGGRKYMMCBGGRRKYYMCCBBGRRKYYMMCBBGRKKYMMCCBGGRKKYMCBGGRRKKYYMCBBGGRRKYMMCCBBGRKYMMCCBGRRKKYYMMCCBGRKKYYMCBBGRRKYMMCCBGRRKYYMCBGRRKKRGGBBCCMMYKKRGGBBCMYYKKRGGBCCMMYKRRGGBBCMYKRGGBBCMY...
output:
No
result:
ok single line: 'No'