QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#56951#2513. A Color GameSa3tElSefrAC ✓476ms506920kbC++201.2kb2022-10-22 02:58:042022-10-22 02:58:07

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-10-22 02:58:07]
  • 评测
  • 测评结果:AC
  • 用时:476ms
  • 内存:506920kb
  • [2022-10-22 02:58:04]
  • 提交

answer

#pragma GCC optimize("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("avx,avx2,fma")

#include <bits/stdc++.h>

#define ll long long
#define ld  double
using namespace std;

const int N = 1000 + 5, mod = 998244353;

string s;
int m, dp[505][505][505];

int nxt[N];

int solve(int l, int r, int rem) {
    // cout << l << ' ' << r << ' ' << rem << endl;
    if(l > r) return 1;
    if(l == r) return (rem == 0);
    int& ans = dp[l][r][rem];
    if(ans != -1) return ans;

    if(rem == 0 && solve(l + 1, r, m - 1)) return ans = 1;

    int toIdx = nxt[l];
    while(toIdx <= r) {
        if(solve(l + 1, toIdx - 1, m - 1) && solve(toIdx, r, max(0, rem - 1))) {
            return ans = 1;
        }
        toIdx = nxt[toIdx];
    }
    return ans = 0;
}

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> s >> m;
    map<char, int> lastSeen;
    for(char c = 'A'; c <= 'Z'; c++) {
        lastSeen[c] = (int) s.size();
    }
    for(int i = (int) s.size() - 1; i >= 0; i--) {
        nxt[i] = lastSeen[s[i]];
        lastSeen[s[i]] = i;
    }
    memset(dp, -1, sizeof dp);
    if(solve(0, (int) s.size() - 1, m - 1)) cout << "Yes";
    else cout << "No";

    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 59ms
memory: 506588kb

input:

BBBRRRRRRGGGB 3

output:

Yes

result:

ok single line: 'Yes'

Test #2:

score: 0
Accepted
time: 76ms
memory: 506640kb

input:

BBBRRRRRRGGGB 4

output:

No

result:

ok single line: 'No'

Test #3:

score: 0
Accepted
time: 72ms
memory: 506696kb

input:

RRRRGGGRRRRRG 3

output:

Yes

result:

ok single line: 'Yes'

Test #4:

score: 0
Accepted
time: 84ms
memory: 506828kb

input:

GMYCGMRMGYMRMKCBKBMKKBMMKBBKMBMRRMGYKKMBKMYRGGBMRMKKKBRCMKYCCKYGYYKKCKRCYGGKGRBCKMYMRCRGBRRYCCKKRRKRCKMMMGCCGYYKMCRGMKCYBMRRKYYRRKGGRBMCKGBBYYGGGBBYBBRCCMGKKGRGRMRRBRCYGGGKBRKCBYCKMMBRCGKCCYYMMCKGRBYRRGBBCGYKBBMKRBBKGCRBYCKMYKMCKMBRMGGYBKBRBMYGGCKYCMYKBRCCGCYRRRKCKCBKCMCYBKRBKMCCYRBKBGGMGMCBGMBMYCCK 1

output:

Yes

result:

ok single line: 'Yes'

Test #5:

score: 0
Accepted
time: 79ms
memory: 506820kb

input:

KKCCCCCKYYYYYYKKKCRRCCBBBGGMMGCKKBBBBBRCCRRCRRYYCCYYBGGGBKKKBKKKCMKKMCCCGGGCCCCBBBCCKMMMKCCYYBBCCCCCCCCCYYCCCCBMMBRRRBBGGMKKBYMMMYYBBBBYYYYKCCCMMCKKMMMKKGGMBBRRBBBBKKBBBMMMMKKMMMKKKMMYYGMYYYMRRBMMMBGRRGGMMCCGRRBBBGCGGGCBBBCCBGGGGCRKKBBBRRYYYBBBYYKKKYYYBBYYBBBBCCCRKYGGGYYKKKKKKKKKRCCCYKKRRRKKMMMKMMC 2

output:

Yes

result:

ok single line: 'Yes'

Test #6:

score: 0
Accepted
time: 84ms
memory: 506660kb

input:

BYCCCYYBMMMMMMMMGYYYBBBYGBBBGGGKKKKKKGGGKKKBBBBKKBBBYYGGGGYGGGMGGGGMCMCCCMMMYYYYYYYYYYYCCCGGGCCRRRCRRBBBBRCCCCCGYCCCCCCYYCCCGGMGGRRRBCCCBMMMMBRCCCCGYYYGRYYYRRMMMMMRRRRMCBBGGGBBGYYYGGGCCGGGGMMBBGGRRRRGBRRRRYYYYBCCCYCCKKKMMMMCCYGGGYCBBBYYYYCCCCYCCCMMMMYYCBBBBBBBCCCCCGGGGCCCGGGGCCBBBBBGGGGMMMBKKKKMMM 3

output:

Yes

result:

ok single line: 'Yes'

Test #7:

score: 0
Accepted
time: 79ms
memory: 506644kb

input:

RMMMRRRRRRMMMMMMMMMMMMMGGGGBBBBMYYYRRRRRRYYMMGGGGMMMYMMRRRKKKKYYYYYYMMMMMMRRRRRKRKKRKKKKRRRKYYYKKKKYKCCCMMKKKKKMMMCKRRRKKKKRRRRRMMMGGGGGGMMMRCCCCYYYYCCCBBBBCCYCCCCCYYYYRRYYYYRRRRRRRRRRRRRBBBKKKKBRRRRBRRRBBBBBGGGGGGBYGGGGGGYKRBBBBBBRRRCCCCCCCCCRRRRRRRRKCCCCKYYYYKKKMMMMKKKBBMMMMBBBBBBBBKKKKKKRRRR 4

output:

Yes

result:

ok single line: 'Yes'

Test #8:

score: 0
Accepted
time: 56ms
memory: 506664kb

input:

BBKKKKKBBBCCCKKKKKKKKKKKKKCCKGGGGGGGCCCCCCMMMMMMMRRRRRRRRRYYKKKKKKYYYRRRRRKKKKKCBBBBBBBBBBRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRBGGGGGGBBBRRRRMMMMMRMMYYYYYYBBBBMMMMMBBYMMMKGGGGGGGKKKKMGGRRRRRRGGGGRRRRRRRYYYKKKBBBBBBKKKCCCCCCKBBBBBBYBBBBBBBBBBBBBBYYBBBBBBBBBBBYYCCCCCYBBBBBBYRRRRRRYMMMMMMGGGGGGGMMMMMYY 5

output:

Yes

result:

ok single line: 'Yes'

Test #9:

score: 0
Accepted
time: 81ms
memory: 506812kb

input:

BBMMCCCCCCCCCMMMMKKKKKKMMMBCCYMMMMMCYYYYYYYCCCCCMMMMMMMYYYYMMMMCCCYYYYYYYYYCCCCMMMMMMMMCCMMMYCCCCCBBBBBBBBBRRRRRRRRBMMMMMMMGGGGGGGGGGGGGGGGGMMMMMMMMMMGGGGBBBBBBBCCCCCCBBGGCCCCCCMMMCCCCCCCCKKKKKKKCMMMBBCMMMMMMMMCCCBBBKKKKGGGGGGKKKKKBBBBCCCCMMMMMMRRRRRRGGGGRRRRRRRGKKKKKKKKKKKKKKKKKKKKKKMMMMMMMMKKGGGG 6

output:

Yes

result:

ok single line: 'Yes'

Test #10:

score: 0
Accepted
time: 79ms
memory: 506620kb

input:

GGGGGGGGGGGGGGGGRRRRRRRRCCCCYMMMMMMMMCCCCCCCCCCMMMMMMMMMMMMMYYMMMMBBBBBBBBMMMMMYMGGGGGGGGGGGGGGGGGGGGGMMMMMMMMMMMMBBBBBGGGGGGGGGGBBBBBBMMMMKKKKKRRRRRRRRRRRKKKKMMMMMMMYYYYYYYYYYKKKKKKKKKYYYYYBBCKKKGGGGGGGGGGGGKKKKKCCCCMMMMMMMMMMCCCCCBMMMMMMMMMMMBBBBBBBYMMMMMMMMMMMMYYYYYYYYYYYYCGGGGGGGGGGCCCCGG 8

output:

Yes

result:

ok single line: 'Yes'

Test #11:

score: 0
Accepted
time: 108ms
memory: 506676kb

input:

MMMMMMMMMMMMMCCCCCCCCCCCGGGGGGGGGGGGGGGGGGGCCCCCCCCCMMMMKKBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCMMMRRRRRRRRRBBBKKKKKKKKKKKKKKKCCCCCCCCCCCCCRRRRRRRRRRRRRRRRRRCCCCCCCCKKKKKKKMKKKKKKKKKKYYYYYYYYYYYYYYYYYYKKKKKKKKKMM 16

output:

Yes

result:

ok single line: 'Yes'

Test #12:

score: 0
Accepted
time: 57ms
memory: 506624kb

input:

GGGGMMMMMMMMMMMMMMMMMMMMMMMMMMRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYMMMMMMMMMMGGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGG 30

output:

Yes

result:

ok single line: 'Yes'

Test #13:

score: 0
Accepted
time: 106ms
memory: 506760kb

input:

RGB 1

output:

Yes

result:

ok single line: 'Yes'

Test #14:

score: 0
Accepted
time: 64ms
memory: 506728kb

input:

BBRBBBRBRBBBRRBBRRBBRRRRBBRRBBRRBRRRRRRBRRRRBBBRBRBBBRRBBRRBBRRRRBBRRBBRRBRRRBBBRRRBRRRBB 4

output:

Yes

result:

ok single line: 'Yes'

Test #15:

score: 0
Accepted
time: 88ms
memory: 506708kb

input:

YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 200

output:

Yes

result:

ok single line: 'Yes'

Test #16:

score: 0
Accepted
time: 476ms
memory: 506840kb

input:

YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 300

output:

No

result:

ok single line: 'No'

Test #17:

score: 0
Accepted
time: 84ms
memory: 506592kb

input:

BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 3

output:

Yes

result:

ok single line: 'Yes'

Test #18:

score: 0
Accepted
time: 80ms
memory: 506652kb

input:

GCGRRRRRGCCBKMMBBYYYYYKRCCCMCCGCCGGGRGGBRRRBRMMMYCCYRKMRRRRRCRMMMCCCMCRRCGGCMMMKKMMCKKMCMKMCYKCCCCKBKKKKMKKKBBBBBRYKKBBGGGYYRRCBBCYYKKKKKKYMYYCKYKKCCYYYBCCCMCGMGGGRGRRKRGGKGMGKBKGGBRMMMKGKGKRRBBKKKGGRRRRGBBKKKRRRKRMMMMRGGGYGCCCCRCMKKKCGRRRGBBYMCCCMRBBCCGBBGBBRMMKKRYYYYYKKKKYYYRRYGKRMMMYYRCCCYYYCMMMR 2

output:

No

result:

ok single line: 'No'

Test #19:

score: 0
Accepted
time: 93ms
memory: 506608kb

input:

BBKKYGGGGYKKKKKCCGGCKKKMMBRRRBBBBBKKKKRRRRBYYBBBBMBBBMYCMMMMBBBCCYCCCYYYYMMCCCBBGGGRRGGGRRBMMMMRRRRMYYYYKKMCCCCMKMMMMKKMKGGCCCCBBCYYYCGGCCCCCYYYYCRRRRRRRRRRRRRRRMRYYYRRMBBBBKGGBBBBMGRRRRYBBYYYGGKKKKCCCMRYGGKGGGGKKKKKYGMMMGGBBBBBBBBGGGGGGMMMGGYBBBBRMCRRRRRYYYYBRYYYKKKKKRRYYYYRRRRBBRYYYBBBCCCYYYYYYMMY...

output:

No

result:

ok single line: 'No'

Test #20:

score: 0
Accepted
time: 99ms
memory: 506724kb

input:

BCCCCYYYYBBYMMMMBBBGGMGGGMMGGGKKKGGGGGGGGGYYYYMYYYRRCCCKYYYYYKKRRRRKKKRRRRRRRRRGGGRMMMMRRCRRRRRCCMMMMCCCCCCCCCGGGRRCCCCCRRRBBBRRGGMMMGGGRRBRMMCCCCMMRKKKKKBBBBBKRBBCCCCCCCCRRRRMMMMMMMMGYYYGGRRRRGGGGRRRCCBBRRRCMMMMMMMMGGGBBBBCCCCMMMMMBYYMMMYBBYYYYBBBBGGGGMMMMMMGBBKKKRRRYYYBBBYRRKBGRKKKKKKKKKKRRRRCMKKK...

output:

No

result:

ok single line: 'No'

Test #21:

score: 0
Accepted
time: 111ms
memory: 506668kb

input:

BGGGGGGMRRRRRRRRRRMMMMMBMMMMCCCCCCYYMMMMYYBBBBBGKKKKKKGGGGBRRRRBBMMMMMMBGGGGGBYYYCCCCCYBBBGRBBBBBRRMMMMMMRRRRRMMMMRRGGGGCBBBBBKKKKKKCCCCCCCCCRBBBGGGGGYYYYBGGGGYYYYRGGGGGYCCCCYYYYYRRKKRRRRRBBBBBBKKKKYYYYRGKKBMMMMBBBBBRRRRRRKKGGGGRRRRRYKKKKKYRRRRRMMMMRRRRBBBBBMMRRRRRRRBBBBBYYYYYCCCCCBBBBBBKCCCCKKKYYYG...

output:

No

result:

ok single line: 'No'

Test #22:

score: 0
Accepted
time: 84ms
memory: 506740kb

input:

BBBBMMMMMBBMYYYYYMMCCCCCMMMKKKKYYYYYYKKGGGGGMMRRBBBBBBRRRRRCBBBBBBBCCCCRRYYYYYYYRRRRYYYYYYGGRRRRRRRRRRRCCCCCCGGGRRKKYYYYYKKCCCCCKRRRRMRRGGGGGGGRMMMMMMMRGGGGYYKKKKKRRRRRKYYYYGGMMMMMMMMMMMMMGCBBBBBBBBBBBBBCGGGGGYYYYYYYCCCCCRRRRRGGGGGGGYYYYYYYCYYYYYCKKKKKKKKKCCCCCCKKCGGGGGGGMMKKKCCCCCCCKKCCCCCKBMMMMMGG...

output:

No

result:

ok single line: 'No'

Test #23:

score: 0
Accepted
time: 80ms
memory: 506664kb

input:

BBBBBBBRRRRRRRRRRRBMMMMMMMMMBBBBGGGGGMMMMMMMMMMMGGRYYYYYGGGMMMMMMMMMMGGGGGGYKKKKKKKKKKKYYYYYCCCCCBKBBBBBBBBBBBKKKGGGGMMMMMMMMMGGGGGGGKKKKKBBBBBBBBCGGGGGGGGGCCCCRRRCCCCCYYYYYYYYYYYCCCCCCCCCCCCCCCCCCYYYYYYYYYYCCCRRRRRRRRRRCCCCCCCCCCCCCCBBBBBBBBBRRRRRRRRRRRRRYYYYYYYYYMMMMMMMMMMYRRRRRRRRRRRRRMGGGGGGGGGG...

output:

No

result:

ok single line: 'No'

Test #24:

score: 0
Accepted
time: 115ms
memory: 506608kb

input:

MMGGGGGGGGGGGGGGGGGGGMMMMMMMYYYGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGYYYYYYYYYYYYYYYYMGGGGGGGGGGGGGGGGGGGCCCCCCYYYYYYYYYYYYYKKKKKKKKKKKKKKKKKKKKKYYYYYCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCYCCCCCCCCCCCYYYYYYYCCCCCCCCCCCCCKKKKKKKKKKKKKKKKKKKKCCCCCCCCYYYYYYYYYYRRRRRRRRRRRRRRRRRCCCCCCCCCCCCCCCCCCCC...

output:

No

result:

ok single line: 'No'

Test #25:

score: 0
Accepted
time: 426ms
memory: 506812kb

input:

MMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGKKKKKKKKKKKRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK...

output:

No

result:

ok single line: 'No'

Test #26:

score: 0
Accepted
time: 71ms
memory: 506588kb

input:

GRRRRRRGGGGGGGGGGGGGBBBGGRRRGGGGGGGGGGGRRRGGGBBBBB 3

output:

Yes

result:

ok single line: 'Yes'

Test #27:

score: 0
Accepted
time: 55ms
memory: 506660kb

input:

GGGGCCMMRRYRRRYYKKKKKBBKRRRYYYRYYYMMMYGCCCKYYYKKCCCGGGCBMMCCBCMMBBBKKKBBGGBKKKMYYKMMMKKKYYKKCCMMCRRRRRYKRRKBBBBRRCCRMMGGBBBKKBRGGRRRRYYRRRYRRKBBGGKRRRRKKKGYYYGYYRGCCCGGGCBMMMRRMMMMKKGGGKBBKBMMCBBBCKKCCBBBKKCGGYYYMMMYYCBMKKKKKMMBYGGBBBGBRRRRRBGCCCGMMGBBBYBBBBBBCCRBBBRCCCYYCBBMRRMCCCRRRBBBYRRRYYCYKKK 2

output:

Yes

result:

ok single line: 'Yes'

Test #28:

score: 0
Accepted
time: 75ms
memory: 506660kb

input:

MMMKKKKKKKKGGGGKBBBBKKKKBCBBBMMMGGGGMCCCCCCCCMMMGGGMCYYYYYYYCCCCBBBGGGBGGBBBYBBBBYYYGGCCCCCKKKKKKKKBBYYYYBBCCCBBBYYYYBGRRRKKMMMKKRGGCCCCCCBBBYYYGMRRRRMMGGGMMMMMMGGGCCCMMBBBBBRRRRBYYYYRYYCBBCCCYYYYCBBCCCKKKKCBMMMKKBBBKKBRRYYYYRBBGYYYYGRRRRRRRRGGBKKKKMMMMMMMBBBBRRRKKKBCKKMMMMKKCCYYYBYYBBBMMRRRRMMYYCCC...

output:

Yes

result:

ok single line: 'Yes'

Test #29:

score: 0
Accepted
time: 92ms
memory: 506604kb

input:

CCCCCRRGGGCCMMGGGGGGMMMCCMMMMMGGGGGYYYYRRRRRRRRRRRRRRRGGMMMMMRYYBGGGGBBBBYYYYRRBBKKKKKKBBBKYYKBBBBBKKKYGGGGYKKKKYKKKRRRMMMMMRKKKKKRRYYYBBBBBBYYYKKKKKKRRRRRRYYYYKKGGGGGKBBMMKKKKKKMMBMMMMKKKKKKMYYYYBBMMMYYYYMMBKKYYYYYYYYYYYYYYYBBBBBBKCCCCKCRRRRCKKBBBBMMMMMMMMMMMMYYYYYYKKKKCCMMMYKYYYYKKKYYYYYRRRRMGGGGG...

output:

Yes

result:

ok single line: 'Yes'

Test #30:

score: 0
Accepted
time: 64ms
memory: 506780kb

input:

MYYYYYRRMMMMGGGGGGMYYYYYMMRYYYYYBBBBBBMMMMMRRRYMMMBBBRCCCCCKKKKKCCCCCCCRRRRRRRRRRCCCCCCCRRBBBBBBRRRCCCCCCRKKKYYYYYKKBBBRRMMMMMMMRRYYYYYYCCCGGGGGGCKKKKKKKKKKKKKKCCCCCCCCRKKKKKKMMBBCCCCCBBBBBBCBBBBRYYYYYYRRRRRBBBKKKGGGGGMMMMMGGKKKKBBGKKKKKGBBBBBBBGGGGKKCGGGGGCBBBBRRRRMMMMMRBCGGGGGGGGGCCCCBBBBBBCCCGGYY...

output:

Yes

result:

ok single line: 'Yes'

Test #31:

score: 0
Accepted
time: 121ms
memory: 506676kb

input:

CCMMMMMMCCRGRRRRRRKKKKKKKKRGRBBBBBBBBBBBBBBBBBRRRRRRRRRBRRRRRRRRRRRRRRGGMMMMGGGGGGGKKKKKCCCCCCBBBBBBBBBCKKKKGMMMMYMMMMMMMYYYYYYYYYYYYYYYYYYYYYGGGGBBBBBBBGGGYYYYYYYYYYMMMYYYYYYMMMMGGGKKKKKKKKKKKKKKGGRRRRYYYYYYKKKKKYYYYYYYYYKKYKKKKKKKBBBBBBBBBBBBBMMMMKGGGGGGGKMMMMMMBBBBBBBBMMMMMMMMMMMMMMMMKKKKKKKKKMMC...

output:

Yes

result:

ok single line: 'Yes'

Test #32:

score: 0
Accepted
time: 84ms
memory: 506840kb

input:

MGGGGGMMMMMMMKKKKKKKKKKKKMMMMMGGGGGGGGGGGGGGCCCCCCCCCCYYYYYYYYYYYYYYCGGKKKKKKKKKKKGGGGGGGGGCCCGMGGGGGGGGGGMMMMGGGGGGGGGGGGMMMKRRRRRRRRRRRRRRRKKKBBBBBBBBBBBBBKKKKKKKKKMMMRRRRRRRRRRRRRRRRRRRRRRBBBBBBGGGGGGGGGGGGGGGGGGGGGGGBBBBRRRRRGGGGGGGGGGGGGRRBBBBBBBBBBBBBRRRBBBBBBBBBBBBBBRRRRCCCCCCCCCRRRRRRRRRRRRR...

output:

Yes

result:

ok single line: 'Yes'

Test #33:

score: 0
Accepted
time: 137ms
memory: 506636kb

input:

CCCCCCCCCCCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMCCCCCMMMMMMMMMMMMMMMMMGGGGGGGGGGGGGGGGGGGGGGMMMMCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMRRRRRRKKKKKKKKMMMMMMRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKRRGGGGGGGGGGGGGGGGGGGGGGGGGGGRRRR...

output:

Yes

result:

ok single line: 'Yes'

Test #34:

score: 0
Accepted
time: 91ms
memory: 506748kb

input:

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYBBBBBBBBBBBBBBBBBBBBBBBBBB...

output:

Yes

result:

ok single line: 'Yes'

Test #35:

score: 0
Accepted
time: 96ms
memory: 506716kb

input:

GBBGGGBBBBBGGBBBBBBBBBBBBRRRRGGBBBRRRRRRRRRRRRRRR 4

output:

No

result:

ok single line: 'No'

Test #36:

score: 0
Accepted
time: 77ms
memory: 506704kb

input:

BBBBBBBBBBBBBBBBBBBBBBBBBBBGGGGGGBBRRRRBBBBBBBBRR 5

output:

Yes

result:

ok single line: 'Yes'

Test #37:

score: 0
Accepted
time: 83ms
memory: 506588kb

input:

GGBBBBBBBBBGGGGBBBBBBBGGGGGRRRRRRRRGGGGBBGGGGGGGGG 8

output:

Yes

result:

ok single line: 'Yes'

Test #38:

score: 0
Accepted
time: 101ms
memory: 506716kb

input:

RRRRRRGGGGGGGGGBBBBBBGRRRRRRRRRGGGGGGGGBBBBRRRRR 10

output:

No

result:

ok single line: 'No'

Test #39:

score: 0
Accepted
time: 64ms
memory: 506652kb

input:

RRRRRRRGGGGGGGRRBBBBBBBBBBBBBBBBBBBRRRRRBBBBBB 5

output:

Yes

result:

ok single line: 'Yes'

Test #40:

score: 0
Accepted
time: 85ms
memory: 506636kb

input:

GGGGKKMGGMMMYGGGKKKKKGCCCCYKKKGGYYGGGMRYYRRRYRMM 3

output:

No

result:

ok single line: 'No'

Test #41:

score: 0
Accepted
time: 66ms
memory: 506644kb

input:

YYYYYCKMMMMMYYYKKKKKKKKBBBCCCCKCCBBBCRRBBBBRRRCCC 4

output:

No

result:

ok single line: 'No'

Test #42:

score: 0
Accepted
time: 80ms
memory: 506636kb

input:

CMCCCCMMMCCCCCGCCCCCCCMMMMMKKKKKKCCCGGGGGMMMM 5

output:

No

result:

ok single line: 'No'

Test #43:

score: 0
Accepted
time: 75ms
memory: 506740kb

input:

KKKKKKYBBBBBBBBBBBBCCCCCCCCCCGGGGGGCCGGGGGGGCCYYYY 6

output:

No

result:

ok single line: 'No'

Test #44:

score: 0
Accepted
time: 52ms
memory: 506628kb

input:

GGGGGGYYYYYYYYYYYYYYYMMMMMMKKKKKKMMMMMMMMYYYYYYYYG 7

output:

No

result:

ok single line: 'No'

Test #45:

score: 0
Accepted
time: 87ms
memory: 506796kb

input:

BCCYYYYYYYYYCCCCCCCCCBBBBRRKKKKKKKKKKRRRRRRRBBBBBB 10

output:

No

result:

ok single line: 'No'

Test #46:

score: 0
Accepted
time: 103ms
memory: 506768kb

input:

YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYKKKKKKKKKKKKKKY 15

output:

No

result:

ok single line: 'No'

Test #47:

score: 0
Accepted
time: 75ms
memory: 506764kb

input:

YYYYYYYKKKKKKKKKKKKKKKKKKKKYYYYYYYYYYYYY 20

output:

Yes

result:

ok single line: 'Yes'

Test #48:

score: 0
Accepted
time: 71ms
memory: 506708kb

input:

GGGGGGGGRRRRRRRRRRRRRRRGGGGGGGGGGGGRRRRGGGGGGGGG 10

output:

Yes

result:

ok single line: 'Yes'

Test #49:

score: 0
Accepted
time: 91ms
memory: 506648kb

input:

GGCCCCGMGGGBRRRRKKGGGBGGGGBBBKKKKKBBBMMBKBBGKKKKKKKKMMYYYYMMMMMMMMMMMMYYRRRGGYM 3

output:

No

result:

ok single line: 'No'

Test #50:

score: 0
Accepted
time: 43ms
memory: 506644kb

input:

YYYGGGRRBGGGGGMCCCCCMMMMBBBBBMMYYYBBRRBBBBBCCCBBBBGGGGGGGGGGGMMMCCCCCCMMMMMCCG 4

output:

No

result:

ok single line: 'No'

Test #51:

score: 0
Accepted
time: 77ms
memory: 506704kb

input:

GGYYYYGGGCCCCCMMMMRRRRRRMCCCCCYYYYCGGGGGCCCKYYYYYYYKYYYYYKKKKKYYKKKGMMMYYYYYM 5

output:

No

result:

ok single line: 'No'

Test #52:

score: 0
Accepted
time: 75ms
memory: 506736kb

input:

KKGGGGGGKKBBBBBBKRKKKKKRRRRRRMMMMMMMKRRRRKKKKKKRYYYYYYRYYYYYYGKKKKKKKGGGGYCCCCCC 6

output:

No

result:

ok single line: 'No'

Test #53:

score: 0
Accepted
time: 71ms
memory: 506784kb

input:

YYYYYYYYYYYMMMMGGGGGGGGKKKKKKKRRRRRRRRRRRKKKKGGGMMMMMGCCCCCCCCCGGGGGGGG 10

output:

No

result:

ok single line: 'No'

Test #54:

score: 0
Accepted
time: 59ms
memory: 506720kb

input:

RRRGRRRRRRRGGGGRRRR 4

output:

Yes

result:

ok single line: 'Yes'

Test #55:

score: 0
Accepted
time: 92ms
memory: 506796kb

input:

YYMMMRRMMMRRBBYYYGCCCCCKMMCCCCKYYRRRRYYCCGGMMRMMMGGGCCGBBGRRGGGBBYMMMYYBBYYMMMMMMMYMMMMYRRRRCBYYYYBBRRBBRRBCCRRRRRRCCKKKKRRCGGCBKKKKRRBBBRRBBBRRRRCR 3

output:

No

result:

ok single line: 'No'

Test #56:

score: 0
Accepted
time: 100ms
memory: 506736kb

input:

MMMYYYYYYGGGGYYCGGGBBMGGKKKKGGMMMBGGGBGGGGYYYYYGBKYYYYYKKKBRRRRRBGGMMMMBYYYYBBCCCCCBBKKKYYYYKCCBBBBGGGCCKKKKCMRRRMKKKMMCCBBBMMMYGGRRRGGGBBBGGGGGKKKKKB 4

output:

No

result:

ok single line: 'No'

Test #57:

score: 0
Accepted
time: 68ms
memory: 506824kb

input:

MMCCCCCCMKKYCMMMMMCMMMCCCCCCMMCRMMMMMMRRRCCCCCCMMMMMCGGGGGGMMMMMMYYYYYMMMMMMMMMMMKKYYGGGGGGYYYYKKMRYCCCCCYYYYRRRRKMGGGGGMMMMMKMMMMRRRRMMMRRRRRYYYYYR 5

output:

No

result:

ok single line: 'No'

Test #58:

score: 0
Accepted
time: 84ms
memory: 506632kb

input:

MCCCMMMMMMMCCCCMMMMMMMMMMCMMMMRRRRRRKKCCCCCCCCCCCKKKKKRRRRRCMMMMMMMCYYYYYYCCCBBBBBMCGGRGGGYYYYYYYYYYYGGRRRGGGGGBBBBBGRGGGGCGGGGGBBBBBBCCCKKCCCCCCKKKKK 6

output:

No

result:

ok single line: 'No'

Test #59:

score: 0
Accepted
time: 92ms
memory: 506820kb

input:

RRMMMMMMMRRGGYYYYYYYYGGKKKKKKKKKKKKKKCCCCCCCCKRRRRRRRYYYYYYCCGGGGGGGGCCCCGGGGGGGGCYYRMMMMMMMCCCCCCCKKKKKKKKKGGYYYYYYYYGGGMMMMMMCCCCYYYYYYYCCCCCMRRR 8

output:

No

result:

ok single line: 'No'

Test #60:

score: 0
Accepted
time: 65ms
memory: 506772kb

input:

GGGYYYYYYYYYYGGBRRRRRCCCCCCKKKKKKKKKKCCCCCRRRRRRRRRRRKKKKKKKKKGGGGKKKKKKKKKGGGGGKKGGGGGGGGGGGRRBBBBBBBBBBRRRRRRRRCCCCCCCCCRRBBBBBBBBBBBBBBBBBBGGGGGG 10

output:

No

result:

ok single line: 'No'

Test #61:

score: 0
Accepted
time: 83ms
memory: 506668kb

input:

CCCCCCCCCCCCCMMMMMMKKKKKCCCCCCCCCCCCMMMCCGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMMMYYYYYYYYYYYYYYYMMCCCKKKKKKKKKKGGGGGGGGGGGGGGGMMMMMMMMMC 15

output:

No

result:

ok single line: 'No'

Test #62:

score: 0
Accepted
time: 76ms
memory: 506820kb

input:

BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 4

output:

Yes

result:

ok single line: 'Yes'

Test #63:

score: 0
Accepted
time: 60ms
memory: 506740kb

input:

KRMMRRRRGGGYYYGGGYMMMMMMMMKRKKKKKMMKYYYYKCCCRGGRGGGGGGRRRRKKRRRRYGGGGCCYYGRRGGCCCMMMMYYBBBBGGGCCCBKYYYKBBBRRRCCCRBCCCBKKBYYRRRYBBKKKBYYMMYBBYYYYYRRRYYYKMMMKKKKRRRRKKYYYRYMMGGMYYYYCCRMMMBBBBMBBBBGGGG 3

output:

No

result:

ok single line: 'No'

Test #64:

score: 0
Accepted
time: 80ms
memory: 506740kb

input:

CCCYYYCKKCCCCCRRRRYYYYYGGGCCCCCGBMYYYKKKKYBBBBBBGGGBGKKKKGGGGGGGMCCCCCMMYYYYYYYYYYMMKKKRRRRKMMMMKMMMMMYYYBCCCCCCCKKKCCCCCCCCBYYYYYBBBBBRYYYRKKKKBYYYYBBKYYYCCCKKRRRBBBYBBBBYYBCCCRRRRBBBBYBBMMMMYYYRKCCC 4

output:

No

result:

ok single line: 'No'

Test #65:

score: 0
Accepted
time: 107ms
memory: 506652kb

input:

KKKKKKKKKKCCCCCKMMMMMMRRKKKKKKRRKYYYYYKYRGGGGBKKKKMMMMMKBBBBBRRGGGGGRRRRRBBCCCCBBRRGGGGRYMMMCCYYYYYCCCCMMRRRRRMYBBBGBBBBBGGGGBBBCCCCCBRRRRRRRRRRBYBBBBBBYYYMMMMCCCCCMBRBBBBKKKKKKRRRYGGGGGYYCCCCKKK 5

output:

No

result:

ok single line: 'No'

Test #66:

score: 0
Accepted
time: 80ms
memory: 506648kb

input:

GCCCCCCCCCCCGYYYYYYGMMMMMGMMMMMMGGGGMMGCCCCCCCMMMMMGGGGMMRRRRRRRRKKYYYYYYKKMMMMMMKKKKKKKKRRRMMMCCCCCGGGGGGGGYYMMMMMYYYYYGKKKKKYYYYYYYGMMMKKKKKMMMMMMMRRRRRYYYYYYMMGGGBBBGGGGGGGBBGGGGGBKCCCCCKKRRRRRKKB 6

output:

No

result:

ok single line: 'No'

Test #67:

score: 0
Accepted
time: 97ms
memory: 506720kb

input:

CCCCCCCCGGGYYYYYYYGGGGGBBBBBCCCCCCCBGGGGGGGGBRRRRRRRRBCYYYYYGCCCCCCCCCGGGGGGGYYKKKKKKKKYBBBBBBMMMMMMMMBBYCKKKKKKMMMMMMMMKCBBBBBBBBKKRRRRRRRKKKKMMMMRRRRRRRRMMMMKKKCCMMMMMMMMMCCCCCCCCYYYYYYYCCCRRRRRRRR 8

output:

No

result:

ok single line: 'No'

Test #68:

score: 0
Accepted
time: 75ms
memory: 506748kb

input:

RRRRRRRRRRRRYYYYGGGYYYYYYYYYYYGGGGGGYMMMMMMMMMMMYYYYYYYYYYYKKKKKKKKKYYYKKKKKKKKKKYYYYYYYRRRRRRRRRRRYMMMMMMMMMMYRRYYYYYYYYKKKKKKKKKKKYRRGGGGGGGGGRRBBBMMMMMMMMMBCCCCCBBBBBBBBBBCCCYYYYYYYYYYYCBBBBBB 10

output:

No

result:

ok single line: 'No'

Test #69:

score: 0
Accepted
time: 93ms
memory: 506784kb

input:

GCCCCCCCCCCBBBBBBBBBBBBBBBCCCCCYYGGGGGGGGGGGGGYGGGGGGGGGGGGGGGYYMMMMMMMMMMMMMMMYYYYYYYYYYYYGGYYYYYYYYYYYYGGGGGGGKKKKKKYYYYYYYYYYYYYYYKKCCCCBBBBBBBBBBBBBBCCCCCCCCCCKKKKKKKGKKKKKKKKKKKKKKKGGGGGGG 15

output:

No

result:

ok single line: 'No'

Test #70:

score: 0
Accepted
time: 67ms
memory: 506728kb

input:

CCCBBBBBBMMMKKKKKGGGGGGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKMMMMMMMMMMMMMMMMMBBBBBBBBBBBBBBCCCCCCCCCCCCCCCCCMMMMMKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGGGGGGGGKMMMMMMMMMMMMMM 20

output:

No

result:

ok single line: 'No'

Test #71:

score: 0
Accepted
time: 84ms
memory: 506768kb

input:

BBBBBBBBBBBBBBBBBBBBBBBBBBBRRRBBBBGGGGGGRRRRRRRR 5

output:

No

result:

ok single line: 'No'

Test #72:

score: 0
Accepted
time: 48ms
memory: 506656kb

input:

CCCGRRRGGRRYYYRMMRRMMMBBBBGGGMRCCCCCCRRRCBBBBMBBBCCCCGGGGCCBBBBCGGGRRRRCCCYYYYYYYKCCCCKKKGCCCRCYRRRRYYYRRRRYYYRRRCYYYRRRRYYYCCCMMMMYRKKKYYYKRYYYYRRKKKCRYYYCCCCRMMMMKKKCCCRRRMMMMBBBBKKKKKRRRRMMMRKKKKRR 3

output:

Yes

result:

ok single line: 'Yes'

Test #73:

score: 0
Accepted
time: 61ms
memory: 506660kb

input:

CCCCCCRRRRRBYYYBBMMMMMMYGGGGGMMMMMGGGGGYYRKKKKRRRRYBBBBYMMMMMMCCKKKKKGGGGCCYBCCCCCGYYYYYYGGGGMMMCCCCCCCCCCCCRRRRRRBBBBCCCCMMBGGBBBBRRRRRRRRRBGCCCCCCKKKKKMMMMMBBBBBBBBBBKGYYYYKKKKKGMMMMMBCCGGGGGCKKKKKC 4

output:

Yes

result:

ok single line: 'Yes'

Test #74:

score: 0
Accepted
time: 56ms
memory: 506644kb

input:

YYYYYYYYYYYYYRYYYYYRMMCCCCCCCCCCCCCBBBBBBBCBBBBBBCCCCCCBGGGGGGGMMMCCCCCCRMMMMMKKKKKYYYYYYKRRRRRRKKKKKKKKKKKGGGGGMRRCKKKKKCRMMBBBBBBBMMMMMRCCCCCCCRRRCCCCCRRCCCCCCCCCCCCCKYYYYYKKKKKKCCCCCCCCCRRRRRRCC 5

output:

Yes

result:

ok single line: 'Yes'

Test #75:

score: 0
Accepted
time: 84ms
memory: 506660kb

input:

RRRRRRRRRGMRRKKKKKKGGGGGGGGKKRRRRRRRMMGMMMMMMMMRRRRRRRMGGGGGGGMMCCGMMMMMMMMMMMMMMMMGGGGMMMMMMGCCCCMCCCCCCCCCCCCGGGGGGGCCRRRRRGGGGGGRRRCCCCGCCCGGKKKKKKKKKKKKKKKMMMMMMMKGGGRRRRGGGGGGGGRRBBBBBBBBG 6

output:

Yes

result:

ok single line: 'Yes'

Test #76:

score: 0
Accepted
time: 67ms
memory: 506716kb

input:

MGGGGGGGGGGCRRRRRRRRRRRRRRRRRRRRRCCCCCCCCCCCCCMMMMMMMMMCCCCCCCCCCMMMMMKKYGGMMMMMMMMMMMMMMMMMMMMMGGGGGKKKKKKKKGGGYYYYYKKKKKKKKKRRRRRRRRRRKKYYYYYYKKKKKKKKKYYYYYYYYYYYYYYYYYYYYYYKMBBBBBBBBBBBBBBBBBBBMMMM 8

output:

Yes

result:

ok single line: 'Yes'

Test #77:

score: 0
Accepted
time: 67ms
memory: 506736kb

input:

CCCCCBBBBBBBBBBBBBBCCGGGGGGGGGGCCCGYYYYYYYBBBBBBBBBMMMMMMMMMMBBBBYYYYGCBBBBBBBBBBBGGGGGGGGGGGBCCCCCCCCCCCCCCGGRRRKKKKKKKKKKKKRRRRRRRGGGGGGGGGGGGGGGGGCCCCCRRRRRRRRRRCCCCCCCCCCCCCCCCCCCCCGG 10

output:

Yes

result:

ok single line: 'Yes'

Test #78:

score: 0
Accepted
time: 63ms
memory: 506720kb

input:

CCCGGCCCGGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCCCGGGGGGGGKKKKKKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCCCCKGGGGGGGCCCCCKKKKKKKKKKKKKKKKKCCCMMMMMMMMMMMMYYYYYYYYYYYYYYYMMMMMMMMGGGGGKKKKKKKKKKKKKKKGGGGGGGGGGGMCCCCCC 15

output:

Yes

result:

ok single line: 'Yes'

Test #79:

score: 0
Accepted
time: 89ms
memory: 506824kb

input:

CRRRRRRRRRRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMKKKKKKKKKKKKKKKKKKKKKMRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKRRRRCCCCCCCCCCCCGGGGGGGGGGGGGGGGGGGGGGGCCCCCCCCCCCCCCCCC 20

output:

Yes

result:

ok single line: 'Yes'

Test #80:

score: 0
Accepted
time: 79ms
memory: 506756kb

input:

KKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKKKKKKKKKKKKKBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBKKKKKKKKKKKKKKKKKK 25

output:

Yes

result:

ok single line: 'Yes'

Test #81:

score: 0
Accepted
time: 117ms
memory: 506656kb

input:

MKKGGGCGGGMMGMMYYYYGYYRRRRYCCYGGGMMCRRRCCKKCKRRKCRRRRCKKKRKKBBBYYYRGGGGGRRMMMMRBBRMMRRRKKKRRRRRRRRRGBBGRRGKKKCCCGGGGYYCBBKKYYYBYBBRRBBBBKGKKKRKKKRGGGGGGGCCCCYYYYGKKKKRRKCCCMMMMGGRRMKMMMKRYGGGGYRRYKCCCMCKKKKCCCRCCCRRGGRCCCCMMKMMMMKGGYBBYRRMMMYYMYYYRRRYYYCCYBYYBBBBYYGGGGYBBMMCCCCMRGGGGKKGRRMMYGGMMMMMM 3

output:

No

result:

ok single line: 'No'

Test #82:

score: 0
Accepted
time: 48ms
memory: 506584kb

input:

GMKKKKMMGBBKKKKKBBBBBBBBYYYBBBRRRBCCCBCGGGGRRYYYRKYYRRRRYYYKKKRRRYYYRKMMMBBBBCCMMMMMMMBBBBBMBBBBBMMMMBBBCCBBBCBCCKKKKKKKKBCCCCCBGGKKKGGGYMMGGGGGMMYYKKKYCCCCCCKKKYYYYCCRRRRYMRRRGGMBBMMMMBBBMMMGMMKRRRRKKRRRCYYYYCCCYCCKBKKKKBBCBBGBBBRRRRRBBCCCGGGRRMMYYYMMMMYYMCCCCMRRGMBBBBBBBMMBCCCYRYCCCCCCYYYYRRRRYY 4

output:

No

result:

ok single line: 'No'

Test #83:

score: 0
Accepted
time: 63ms
memory: 506660kb

input:

CRRRRRYYYYMMMMMMYYYYYYYYRRRRRRRRRRRRRBBBBRRRRRYYYYMMMMYCCBKBBBBBBKCKKKKCCCKKKYYYYGGGGKCKKKKKKCCCRRRRRRRBBBBCCCCGGGGGBBRBBBBBBBCMMMCCCCCCCCCCBBBBBMBBBBBMMMMGGGGGMMCCCCRBBKKKYYGGGGGYYKKKBBBBCCCCCCRRCCCCCRGGYYYYYGGGGGGGGYYMMMMMRKKKKKKRRRRMMMMGGGGGGMMCCCCMBBBBBBYBBBBBGGGBBBBBBGGBBBBBGYYRCBBBBCYYYYYY 5

output:

No

result:

ok single line: 'No'

Test #84:

score: 0
Accepted
time: 92ms
memory: 506740kb

input:

BBBBBBGGGGGGGBBBBBBBBBBBBBMCGRRRRRGGKKKKKKGGGCCMMMMMMMCKKKKRRRRRKCCYYYYYYYCCCCCCGGYYYYYKKKKKKYGBBBBBBBKKKKKKKBBBYYYYYBBGGBBBBMMMMMBBBGGGBBBBBBBGGGGGGGGGGGGGGGGGGGMGGGGGMYYYYYYMMMMRRRRCCCCCRRRRRRRRRRRRRRRMMMBBBKKKKKKGGGGGBBBBBBKKKKKKKGBGGCCCCCCCGGGGGBBCCCYYYYYYYCCCBBBBGGGGGGMMCCCCCCMMMMMBBMMCCCCCCC 6

output:

No

result:

ok single line: 'No'

Test #85:

score: 0
Accepted
time: 79ms
memory: 506632kb

input:

YYYYYGGGGGGGYKKKKKKKKYKKKKKKKYYRRRRRRRCCCCCCCCCCCCCCCCCCGMMMMMMMKKKKKKKKRGGGCCCCCCCCGGGGGGGGGGGGGGGGGGGGRKKKKKKKMMMMMMMMMMMMMMMMKKRRRRBBBBBBBBRKKKKKBBBBBBBBBBBBBBKRRRMMMMMMMMRRRRRKKGGGGGGGGGGGGGGGGGGGGKKKKKCCCCCCCCKKKKKKKKKKKMGGGGGGGCCCCCCCGGMMMMMMGGGGGKKKKKKKKKGGRRRRRRRRRGMMMMMMMYYBBBBBBBBBYYYYYYMG 8

output:

No

result:

ok single line: 'No'

Test #86:

score: 0
Accepted
time: 88ms
memory: 506736kb

input:

RRRCCCCCCRRRRRRRRRKKKKKKKKKKKRRCCCRBBBBBBBBBMMMMMMMMMRRRRRRCCCCMMMYYYYYYYYYMMMMMMYYYYYYYYYYYMMMMMMMMMMMMCCCCCKKKKKKBBBBBBBBBYYYMMMMMMMMMMMYYYYYYYMMMMMMGGGGGGGGGMMMMBBKKKCRRYYYYYYRRRRRRRRRBBBBBBBBBYYYYRRKKKKKKMMMMMMMMMMMKKBBBMYYYYYYYYYYYMMKKKKKKKKKMMMMMMMRRRRRRRRRBBBBBBBBBBBBBBBBBBKKKRRRRRRR 10

output:

No

result:

ok single line: 'No'

Test #87:

score: 0
Accepted
time: 71ms
memory: 506812kb

input:

CCCCCCCCGGGGGGGGGGGGGGGGCCCCMMMMMMMMMMMMMMMMCCCCCCCCCCCKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCMMMMMMMMMMMMMMMMCCCCCCCCGGGGGGGGGCCCCCCCCCCCCCCCGGGGGGCCCCCCCCCCCCCCKKKKKKKRRRRMMMMMMMMMMMMMMMRRRRRRRRRRRKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCCCCCCCCCCCCCCCKKKC 15

output:

Yes

result:

ok single line: 'Yes'

Test #88:

score: 0
Accepted
time: 51ms
memory: 506732kb

input:

MMMMMMMMMMRRRRRRGGGGGGGGGGGGGGGGGGGRRRRRRRRRRMMMMMMYYYYYBBBBBBBBBBBBBBBBBBBBYYYYYYYYYYYYMMMMMMMMMMMMMCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMMMMMMMYYYYMMMMMMMMMMMMMMRRRMMMMMMMMMMMMMMMMMMMMMMMMMMMMMBBBBBBBBBBBBBBGGGGGGGGGGGGGGGGGGGGYYYYYYYYYYYYYYYYYYYYYBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCMM 20

output:

No

result:

ok single line: 'No'

Test #89:

score: 0
Accepted
time: 68ms
memory: 506784kb

input:

YYBBBBBBBBBBBBBBBBBBBBBBBBBBBBBYYYYYGGGGGGGGGGGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMGGGGGGGGGGYYYYYYYYYYYYYYMMMMMMMMMMMMMMMMMMRRRRRRRRRRRRRRRRRRRRRRRRRRRRRMMMMMMMMMMMMMYYYYYYGGGGGGGGGGBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBGGGGGGKKKKKKKKKKKKKKKKKKKKKKKKKKKKKGGGGGGGGGGGGGGYYY 30

output:

No

result:

ok single line: 'No'

Test #90:

score: 0
Accepted
time: 75ms
memory: 506636kb

input:

RBMKYGCGBRYMCKBCMRGYKGMKCBYRGRKYCBMKBMGCYRGYMCRKBGKMBCYRYMRBKGCKGBMRYCGMBKYRCGCMBRKYCGYBKMRBRKYGCMBGMCYKRCYKMBGRBYRMGKCRGBKYCMBMGRYCKMRCBYGKRMGKYBCKBRYCMGMCRBKGYMRKCGBYGYCMBRKGBRMYKCRGKMBCYKRGBCMYMGYCRKBYCBKGRMBGYKRMCRMCYKBGRKCGMYBCBKYMRGKGYMRBCRKBGYCMYRGBMCKBKGYMRCKMGBRYCMKYRGBCMBCGKYRYGMBKRCBCGRMK...

output:

No

result:

ok single line: 'No'

Test #91:

score: 0
Accepted
time: 35ms
memory: 506920kb

input:

RMGCKYBKGBCYMRYGBKRCMBGMCYRKMBCKGRYBMGCKYRBYCMRKGBMKRGYCBMKRGYCKYGBCMRYGCBRKMCGBMYRKRKBYCGMCMRKYGBCBRMKYGBKRCMYGRCGBYKMKMRGCYBRKBMYGCMRYBGCKRYCGMBKMCRBKYGYRCBGMKGRCYBKMRMKYCBGYKCBRGMYGCRMBKMYBCKGRBKYMRCGRYMBCGKRBMGYKCKMBCRGYKCBMGRYGMCRYBKGMCRYKBMYKRGBCBGRMYKCMGYBKCRGBCRMYKMCRKYBGBKYCRMGCRBGYMKBGKRMC...

output:

Yes

result:

ok single line: 'Yes'

Test #92:

score: 0
Accepted
time: 93ms
memory: 506828kb

input:

CBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYK...

output:

No

result:

ok single line: 'No'

Test #93:

score: 0
Accepted
time: 95ms
memory: 506656kb

input:

CBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKYMCBGRKKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYKRGBCMYK...

output:

Yes

result:

ok single line: 'Yes'

Test #94:

score: 0
Accepted
time: 92ms
memory: 506636kb

input:

MCCBBGRRKKYMCBGRKYYMMCBBGRRKYYMCBGGRKYYMCCBGGRRKYYMCBGGRRKYYMMCCBBGRRKKYYMCBBGRRKYMCBBGGRRKKYMMCCBGGRKYMMCBBGRRKYMCCBBGGRRKYMMCCBGRKKYYMMCCBBGRKYMMCCBBGGRKYYMMCCBBGRRKYMCCBGGRKKYYMCBGRKKYMMCBBGGRKKYMCCBGRRKYMMCBBGGRKYMCBGGRKKYMMCBGGRRKKYMMCCBBGGRRKKRGBCMYYKRGBBCCMYYKRRGBBCCMMYYKKRRGBCCMYYKKRGGBBCMMY...

output:

Yes

result:

ok single line: 'Yes'

Test #95:

score: 0
Accepted
time: 63ms
memory: 506864kb

input:

CBBGGRKKYMCBGRKKYYMMCBBGRKKYYMCBBGGRKKYMMCBBGRKYMCBGGRKYYMMCCBBGGRRKKYMCCBBGRRKKYMMCCBGRRKKYYMCCBGGRKKYMMCCBGGRKYYMMCBBGGRKYMMCBGGRRKYYMCCBBGRRKYYMMCBBGRKKYMMCCBGGRKKYMCBGGRRKKYYMCBBGGRRKYMMCCBBGRKYMMCCBGRRKKYYMMCCBGRKKYYMCBBGRRKYMMCCBGRRKYYMCBGRRKKRGGBBCCMMYKKRGGBBCMYYKKRGGBCCMMYKRRGGBBCMYKRGGBBCMY...

output:

No

result:

ok single line: 'No'