QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#404132#6808. LilyjiajieshiAC ✓1ms3764kbC++209.0kb2024-05-03 13:00:072024-05-03 13:00:08

Judging History

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

  • [2024-05-03 13:00:08]
  • 评测
  • 测评结果:AC
  • 用时:1ms
  • 内存:3764kb
  • [2024-05-03 13:00:07]
  • 提交

answer

#include<bits/stdc++.h>
#define ll long long 
#define pii pair<int,int>
#define pss pair<string,string>
#define fi first
#define se second
#define pb push_back
#define pbb pair<bool,bool>
#define un unsigned
#define ull unsigned long long
#define	int_INF 0x3f3f3f3f
#define LL long long
#define ll_INF 0x3f3f3f3f3f3f3f3f
#define lb long double
#define db double
#define re return
#define pll pair<ll,ll>
#define mp make_pair
#define eb emplace_back
#define all(x) (x).begin(),(x).end()
#define debug(a) cout<<"debug: "<<(#a)<<" = "<<a<<'\n'
#define cer(a) cerr<<#a<<'='<<(a)<<"@ line"<<__LINE__<<endl
#define cer2(a,b) cerr<<#a<<'='<<(a)<<','<<#b<<'='<<(b)<<"@ line"<<__LINE__<<endl
#define cer3(a,b,c) cerr<<#a<<'='<<(a)<<','<<#b<<'='<<(b)<<','<<#c<<'='<<(c)<<','<<"@ line"<<__LINE__<<endl
#define pdd pair<db,db>
#define Yes cout<<"Yes"<<'\n'
#define No cout<<"No"<<'\n'
#define KV(x) #x << " = " << x << ";"
#define DEBUG DebugLine(__LINE__)
#define bitCount(x) __builtin_popcount(x)
using namespace std;
const int maxn=2e5+100;
const ll mode=998244353;
const ll mode2=1e9+7;
const ll inf=9223372036854775807;
const db eps=1e-6;
typedef pair<int,int> hashv;
mt19937 mrand(random_device{}()); 
hashv operator + (hashv a,hashv b) {
	int c1=a.fi+b.fi,c2=a.se+b.se;
	if (c1>=mode) c1-=mode;
	if (c2>=mode2) c2-=mode2;
	return mp(c1,c2);
}

hashv operator - (hashv a,hashv b) {
	int c1=a.fi-b.fi,c2=a.se-b.se;
	if (c1<0) c1+=mode;
	if (c2<0) c2+=mode2;
	return mp(c1,c2);
}

hashv operator * (hashv a,hashv b) {
	return mp(1ll*a.fi*b.fi%mode,1ll*a.se*b.se%mode2);
}
int rnd(int x) { return mrand() % x;}
struct DebugLine {
  explicit DebugLine(int lineno) { std::cerr << lineno << "L "; }
 
  ~DebugLine() { std::cerr << std::endl; }
 
  template <typename T> DebugLine &operator<<(T &&v) {
    std::cerr << std::forward<T>(v);
    return *this;
  }
};
double PI = 3.141592653;
double my_cos(double x){
    return cos(x*PI / 180.0);
}
double my_sin(double x){
    return sin(x*PI / 180.0);
}
double my_tan(double x){
    return tan(x*PI / 180.0);
}
ll n,m,a[maxn];
ll sum,ans;
string str;
vector<int>vt;
int vis[maxn]; 
ll ksm(ll a,ll b,ll p)
{
	ll res=1ll;
	while(b)
	{
		if(b&1)
		res=res*a%p;
		b>>=1;
		a=a*a%p;
	}
	return res;
}
struct Hash_char{
    const ll mod=998244353, base=131;
    ll p[maxn], g[maxn];
    void getp(){
        p[0]=1;
        for(int i=1; i<maxn; i++){
            p[i]=p[i-1]*base%mod;
        }
    }
    LL Hash(char s[]){
        int len=strlen(s+1);
        g[0]=0, g[1]=s[1];
        for(int i=2; i<=len; i++){
            g[i]=(g[i-1]*base+s[i])%mod;
        }
        return g[len];
    }
    LL getLR(int l, int r){//µÃµ½s[l]-s[r]µÄhashÖµ 
        if(l>r) return 0;
        LL ans=((g[r]-g[l-1]*p[r-l+1])%mod+mod)%mod;
        return ans;
    }
    
 
}T[2];
LL strfz(int pos, int l, int r){//pos:Õý·´´®,·­×ªl, r¡£ 
    LL ans=T[pos].getLR(1, l-1)*T[pos].p[n-l+1]%T[pos].mod;
    LL res=T[pos^1].getLR(n-r+1, n-r+1+r-l)*T[pos].p[n-r]%T[pos].mod;
    ans=ans+res+T[pos].getLR(r+1, n);
    return ans%T[pos].mod;
}

template<const int T>
struct ModInt {
    const static int mod = T;
    int x;
    ModInt(int x = 0) : x(x % mod) {}
    ModInt(long long x) : x(int(x % mod)) {} 
    int val() { return x; }
    ModInt operator + (const ModInt &a) const { int x0 = x + a.x; return ModInt(x0 < mod ? x0 : x0 - mod); }
    ModInt operator - (const ModInt &a) const { int x0 = x - a.x; return ModInt(x0 < 0 ? x0 + mod : x0); }
    ModInt operator * (const ModInt &a) const { return ModInt(1LL * x * a.x % mod); }
    ModInt operator / (const ModInt &a) const { return *this * a.inv(); }
    bool operator == (const ModInt &a) const { return x == a.x; };
    bool operator != (const ModInt &a) const { return x != a.x; };
    void operator += (const ModInt &a) { x += a.x; if (x >= mod) x -= mod; }
    void operator -= (const ModInt &a) { x -= a.x; if (x < 0) x += mod; }
    void operator *= (const ModInt &a) { x = 1LL * x * a.x % mod; }
    void operator /= (const ModInt &a) { *this = *this / a; }
    friend ModInt operator + (int y, const ModInt &a){ int x0 = y + a.x; return ModInt(x0 < mod ? x0 : x0 - mod); }
    friend ModInt operator - (int y, const ModInt &a){ int x0 = y - a.x; return ModInt(x0 < 0 ? x0 + mod : x0); }
    friend ModInt operator * (int y, const ModInt &a){ return ModInt(1LL * y * a.x % mod);}
    friend ModInt operator / (int y, const ModInt &a){ return ModInt(y) / a;}
    friend ostream &operator<<(ostream &os, const ModInt &a) { return os << a.x;}
    friend istream &operator>>(istream &is, ModInt &t){return is >> t.x;}
 
    ModInt pow(int64_t n) const {
        if(n == 0) return 1;
        ModInt res(1), mul(x);
        while(n){
            if (n & 1) res *= mul;
            mul *= mul;
            n >>= 1;
        }
        return res;
    }
     
    ModInt inv() const {
        int a = x, b = mod, u = 1, v = 0;
        while (b) {
            int t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        if (u < 0) u += mod;
        return u;
    }
     
};
using mint = ModInt<1000000007>;
ll ecgcd(ll a,ll b,ll& x,ll& y)
{
    if(b==0)
    {
        x=1,y=0;
        return a;
    }
    ll d=ecgcd(b,a%b,y,x);
    y-=a/b*x;
    return d;
}
//class manacherWrapper
//{
//    private:
//        int l_;
//        string s_;
//    public:
//        std::vector<int> p;
//        std::vector<int> b;
//        std::vector<int> s;
//        explicit manacherWrapper(string str)
//        {
//            auto l = str.size();
//            //rebuild
//            l_ = l;
//            s_.resize(((l_ + 1) << 1) | 1);
//            p.resize(((l_ + 1) << 1) | 1);
//            b.resize(l_);
//            s.resize(l_ + 1);
// 
//            s_[0] = '$', s_[1] = '#';
// 
//            for (int i = 0; i < l_; ++i)
//                s_[(i + 1) << 1] = str[i], s_[((i + 1) << 1) | 1] = '#';
//            l_ = (l_ + 1) << 1;
//            //calc p
//            int mx = 0, id;
//            for (int i = 0; i < l_; ++i)
//            {
//                if (mx > i)p[i] = std::min(p[(id << 1) - i], mx - i);
//                else p[i] = 1;
//                for (; s_[i - p[i]] == s_[i + p[i]]; p[i]++);
//                if (p[i] + i > mx)
//                {
//                    mx = p[i] + i;
//                    id = i;
//                }
//            }
//            //calc b and s
//            for (int i = 0; i < l; ++i)
//            {
//                auto lp = get(i);
//                b[i - (lp >> 1)] = std::max(b[i - (lp >> 1)], lp);
//                s[i - (lp >> 1)]++, s[i + 1]--;
//                if (i + 1 >= l)break;
//                lp = get(i, i + 1);
//                if (lp > 0)
//                {
//                    b[i + 1 - (lp >> 1)] = std::max(b[i + 1 - (lp >> 1)], lp);
//                    s[i + 1 - (lp >> 1)]++, s[i + 1]--;
//                }
//            }
//            for (int i = 1; i < l; ++i)
//            {
//                b[i] = std::max(b[i], b[i - 1] - 2);
//                s[i] += s[i - 1];
//            }
//        }
// 
//        int get(int pos)
//        {
//            return (int) p[(pos + 1) << 1] - 1;
//        }
// 
//        int get(int posl, int posr)
//        {
//            return (int) p[((posl + 1) << 1) | 1] - 1;
//        }
// 
//        int longestBegin(int begin)
//        {
//            return b[begin];
//        }
// 
//        int totalBegin(int begin)
//        {
//            return s[begin];
//        }
// 
//        bool isPalindrome(int l,int r)
//        {
//            if (l > r)std::swap(l, r);
//            auto mid = (l + r) >> 1;
//            auto len = (r - l + 1);
//            return len & 1 ? get(mid) >= len : get(mid, mid + 1) >= len;
//        }
//};
//void scan(__int128 &x){//input
//	x = 0;
//	int f = 1;
//	char ch;
//	if((ch = getchar()) == '-'){
//		f = -1;
//	}else{
//		x = x * 10 + (ch - '0');
//	}
//	while((ch = getchar()) >= '0' && ch <= '9'){
//		x = x * 10 + (ch - '0');
//	}
//	x *= f;
//}
//void print(__int128 x){//output 
//	if(x < 0){
//		x = -x;
//		putchar('-');
//	}
//	if(x > 9){
//		print(x/10);//recursion
//	}
//	putchar(x%10+'0');
//}
void solve()
{
	cin>>n;
	cin>>str;
	string s="";
	for(int i=0;i<n;i++)
	{
		if(str[i]=='L')
		{
			s+="L";
			continue;
		}
		if(i==0)
		{
			if(str[i+1]!='L')
			s+='C';
			else s+='.';
			continue;
		}
		if(i==n-1)
		{
			if(str[i-1]!='L')
			s+='C';
			else s+='.';
			continue;
		}
		if(str[i-1]!='L'&&str[i+1]!='L')
		s+='C';
		else s+='.';
	}
	cout<<s;
}
int main(){
	#ifndef ONLINE_JUDGE
		freopen("C:\\Users\\JIAJIEASHI\\Desktop\\in.cpp","r",stdin);
	//	freopen("out.cpp","w",stdout);
	#endif
    ios::sync_with_stdio(false);
	cin.tie(0);cout.tie(0);
	int test_case;
	test_case=1;
//	cin>>test_case;
	while(test_case--) 
    solve();
	return 0;
}



这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3472kb

input:

5
..L..

output:

C.L.C

result:

ok "C.L.C"

Test #2:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

2
..

output:

CC

result:

ok "CC"

Test #3:

score: 0
Accepted
time: 0ms
memory: 3536kb

input:

1
.

output:

C

result:

ok "C"

Test #4:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

1
L

output:

L

result:

ok "L"

Test #5:

score: 0
Accepted
time: 1ms
memory: 3692kb

input:

2
LL

output:

LL

result:

ok "LL"

Test #6:

score: 0
Accepted
time: 1ms
memory: 3592kb

input:

2
L.

output:

L.

result:

ok "L."

Test #7:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

2
.L

output:

.L

result:

ok ".L"

Test #8:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

998
LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

output:

LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...

result:

ok "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLL...LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL"

Test #9:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

999
...........................................................................................................................................................................................................................................................................................................

output:

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC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..LL.LLLL..LLLL.L.L.L.LLLLLLLLLLL.C.L.LLLLL.LLLL.LLLL..LLLLLLLLLLLLLLLLLL..LLL..LLLLLLLLL.L.LL.CCCC.LL.LLLLLLL.LLLLLLL.LLLLLLL..LL.L.L.LLLLLLL.LL.CC.LLLL..LL..L...

result:

ok ".LLLL.L.LLLLLLLLLL.LLL..LL.LL....LL.L.C.LL..LLLLLLLLLLLL.LLLL.LL"

Test #13:

score: 0
Accepted
time: 0ms
memory: 3628kb

input:

1000
.L.LL....L.L.LLLLLLL.L.LLL.LL...LLLLLL..LLL.LLLLL.L.LLLLLLL.LLLLL..L..L.LL.L..LLL..L.LLLLLLLLLLL.LLL..LL.LL...LLLLL..L....LL.LLLL.L.LLL.LLLLLLL..LL.LLL.LLLLLL.L...L.L.LLLLL.LLLLLL.LLLLL...LLLLLL.LLLL...L.LLLL.LLLLL.....L...LLLL.LLLLLLLL.L.L...L.LL.LL.LLLLLLLLL.LLLL.L..LL..LLLL.LLL..LLLLL.LLLLLL...

output:

.L.LL.CC.L.L.LLLLLLL.L.LLL.LL.C.LLLLLL..LLL.LLLLL.L.LLLLLLL.LLLLL..L..L.LL.L..LLL..L.LLLLLLLLLLL.LLL..LL.LL.C.LLLLL..L.CC.LL.LLLL.L.LLL.LLLLLLL..LL.LLL.LLLLLL.L.C.L.L.LLLLL.LLLLLL.LLLLL.C.LLLLLL.LLLL.C.L.LLLL.LLLLL.CCC.L.C.LLLL.LLLLLLLL.L.L.C.L.LL.LL.LLLLLLLLL.LLLL.L..LL..LLLL.LLL..LLLLL.LLLLLLLL..L...

result:

ok ".L.LL.CC.L.L.LLLLLLL.L.LLL.LL.....LLLLL.LL.CC.L.LLL..L.L.L.L..L."

Test #14:

score: 0
Accepted
time: 0ms
memory: 3764kb

input:

1000
L.LLL..LLL.L.L.LL.LL..LL...LLLLL........L..L.L....L.L..LL.LL.L.LLLL....L..L.LL..L.LL.LLLLL.LL..L.LL......LLLLL.L..LLLL..L....LLLL.LLL.LLLLLL.LLLLL.LLL.L...LLL.L.L..LL.LLLLL.L..LL......L....LLL.L..L..L...L.L.LLL..L....L..L.L..LL..LLLLL...L..L...LLL.L.LL.L.L...L.LLLLL.L.LL.L..LL.LLL..LLL.LLL.L......

output:

L.LLL..LLL.L.L.LL.LL..LL.C.LLLLL.CCCCCC.L..L.L.CC.L.L..LL.LL.L.LLLL.CC.L..L.LL..L.LL.LLLLL.LL..L.LL.CCCC.LLLLL.L..LLLL..L.CC.LLLL.LLL.LLLLLL.LLLLL.LLL.L.C.LLL.L.L..LL.LLLLL.L..LL.CCCC.L.CC.LLL.L..L..L.C.L.L.LLL..L.CC.L..L.L..LL..LLLLL.C.L..L.C.LLL.L.LL.L.L.C.L.LLLLL.L.LL.L..LL.LLL..LLL.LLL.L.CC.LLLL...

result:

ok "L.LLL..LLL.L.L.LL.LL..LL.C.LLL...C.L..L..LL.C.LLLL..L..L.L.L.CCC"

Test #15:

score: 0
Accepted
time: 1ms
memory: 3572kb

input:

1000
.L.L....LLLL.L...L..L..LLLLL.L.LLLL.LLL.LL.LLL...L..L.....L....LLL.L..LLL...L.LL.LL..L......LL.L....LLLLL..LLL.L.LLL..LLL.L..L.LL...L.LL...LLLLL.L.L...LLLLL.LLL..L..LL....LLLLLLL.......L.L.L..L....L..L.L..L....LLLLLL..LLL.LL.LL..L..L..LL.LLLLLL.....LLL..L.LL...L...LL..LLLL..........L....LL.L......

output:

.L.L.CC.LLLL.L.C.L..L..LLLLL.L.LLLL.LLL.LL.LLL.C.L..L.CCC.L.CC.LLL.L..LLL.C.L.LL.LL..L.CCCC.LL.L.CC.LLLLL..LLL.L.LLL..LLL.L..L.LL.C.L.LL.C.LLLLL.L.L.C.LLLLL.LLL..L..LL.CC.LLLLLLL.CCCCC.L.L.L..L.CC.L..L.L..L.CC.LLLLLL..LLL.LL.LL..L..L..LL.LLLLLL.CCC.LLL..L.LL.C.L.C.LL..LLLL.CCCCCCCC.L.CC.LL.L.CCC.LL....

result:

ok ".L.L.CC.LLLL.L.C.L..L..LLLLL.L....C.LL.L.C.LL.LL.LLLLL.CCC.L.C.L"

Test #16:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

1000
L...L....LL...LL.LL.L........L..LLLLLL.L..L.LL.L.L...L.......LL...LL..........L..L.........LL.L.....LL.LL..LL..L..LL..L.L..L...LL.L.L.LLL...L.L...L.....L...L.L.L.LLL..L.....L.LL...L....L....LL.....LL....L...LL..L..L..L..L...LL.LL...L......L............L.L..L....LLL.L...L......LL...LL.........L....

output:

L.C.L.CC.LL.C.LL.LL.L.CCCCCC.L..LLLLLL.L..L.LL.L.L.C.L.CCCCC.LL.C.LL.CCCCCCCC.L..L.CCCCCCC.LL.L.CCC.LL.LL..LL..L..LL..L.L..L.C.LL.L.L.LLL.C.L.L.C.L.CCC.L.C.L.L.L.LLL..L.CCC.L.LL.C.L.CC.L.CC.LL.CCC.LL.CC.L.C.LL..L..L..L..L.C.LL.LL.C.L.CCCC.L.CCCCCCCCCC.L.L..L.CC.LLL.L.C.L.CCCC.LL.C.LL.CCCCCCC.L.CC.LL...

result:

ok "L.C.L.CC.LL.C.LL.LL.L.CCCCCC.L...L.CCC.L.LL.CCC.LLLLL..LL.LL.CCC"

Test #17:

score: 0
Accepted
time: 0ms
memory: 3472kb

input:

1000
..L.......L......L...L.LL.......L...L......L..LL.........L...L...L....L...L....LL..L..L..L.......LL....L......L.L...L..L...........L..LL...L.....L.L.L........L........LL.................LL..L.L.LL..........L............L.........L.........L.......L.............L............L...LL.L.....L..LL......

output:

C.L.CCCCC.L.CCCC.L.C.L.LL.CCCCC.L.C.L.CCCC.L..LL.CCCCCCC.L.C.L.C.L.CC.L.C.L.CC.LL..L..L..L.CCCCC.LL.CC.L.CCCC.L.L.C.L..L.CCCCCCCCC.L..LL.C.L.CCC.L.L.L.CCCCCC.L.CCCCCC.LL.CCCCCCCCCCCCCCC.LL..L.L.LL.CCCCCCCC.L.CCCCCCCCCC.L.CCCCCCC.L.CCCCCCC.L.CCCCC.L.CCCCCCCCCCC.L.CCCCCCCCCC.L.C.LL.L.CCC.L..LL.CC.LL.L...

result:

ok "C.L.CCCCC.L.CCCC.L.C.L.LL.CCCC...CCCC.LL.LL.L.LL.CCCCCCCCCC.L.CC"

Test #18:

score: 0
Accepted
time: 0ms
memory: 3756kb

input:

1000
.........L................L.................L.......................L..L........L............L..L...L.L..L...L.........................................LL...L............L..L..L........................L...L.......L...........L..............L..L..L....L.....L...L.......L...L...................L.L...

output:

CCCCCCCC.L.CCCCCCCCCCCCCC.L.CCCCCCCCCCCCCCC.L.CCCCCCCCCCCCCCCCCCCCC.L..L.CCCCCC.L.CCCCCCCCCC.L..L.C.L.L..L.C.L.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.LL.C.L.CCCCCCCCCC.L..L..L.CCCCCCCCCCCCCCCCCCCCCC.L.C.L.CCCCC.L.CCCCCCCCC.L.CCCCCCCCCCCC.L..L..L.CC.L.CCC.L.C.L.CCCCC.L.C.L.CCCCCCCCCCCCCCCCC.L.L..L.....

result:

ok "CCCCCCCC.L.CCCCCCCCCCCCCC.L.CC...CCCCCCCCC.L.CCCC.L.CCC.L.L.CCCC"

Test #19:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

1000
..........................................................................................................................................................................................................................................................................................................

output:

CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...

result:

ok "CCCCCCCCCCCCCCCCCCCCCCCCCCCCCC...CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC"

Test #20:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

1000
LLLL.L...LLLL..LLL.LLL.L....L.LLLLL.LL.L.LLLLLLLL..LLLLLL..LLL.L...L..L..L.LLLLL.L.L.L.LLL.LLLL.LLL.LLL.LLL..L.L..L.L.L..L.LLLL.LLLLLL...LLL..LL.LL.L.LLL.L.L.LLLLL..L.L.LL.LLLL....LLLLLL.LLLLLL.LLLL.LLL..L.LLLL..LL.LLL.LL.L.L.LLLLLL.LLLL.....LLLL.LLLL..LL...LLLLL.LLL...LLLL.LL.LLLLLL.LL.LLLL.L....

output:

LLLL.L.C.LLLL..LLL.LLL.L.CC.L.LLLLL.LL.L.LLLLLLLL..LLLLLL..LLL.L.C.L..L..L.LLLLL.L.L.L.LLL.LLLL.LLL.LLL.LLL..L.L..L.L.L..L.LLLL.LLLLLL.C.LLL..LL.LL.L.LLL.L.L.LLLLL..L.L.LL.LLLL.CC.LLLLLL.LLLLLL.LLLL.LLL..L.LLLL..LL.LLL.LL.L.L.LLLLLL.LLLL.CCC.LLLL.LLLL..LL.C.LLLLL.LLL.C.LLLL.LL.LLLLLL.LL.LLLL.L.L.LL....

result:

ok "LLLL.L.C.LLLL..LLL.LLL.L.CC.L.....LLLLLLLLLL.LLL.LLLLLL.LLL.C.LL"

Test #21:

score: 0
Accepted
time: 1ms
memory: 3712kb

input:

1000
LLLLLLLLLLLLLLLLLL.LLLLLLLLL.LLLLLLLLLL.LL..LLLLL.LLLLLLLLLLLLLL.L.LLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLL.LLL.LLLLL..L.LLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLL..LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLL.LLLLLLLLLLLLLLLLLL...

output:

LLLLLLLLLLLLLLLLLL.LLLLLLLLL.LLLLLLLLLL.LL..LLLLL.LLLLLLLLLLLLLL.L.LLLLLLLLLLLLLLLLLLLL.LLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLL.LLL.LLLLL..L.LLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLL..LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLL.LLLLLLLLLLLLLLLLLLLLLLL...

result:

ok "LLLLLLLLLLLLLLLLLL.LLLLLLLLL.L...LLLLLLLLLLLL.LLLLLLLLLLLLLLLLLL"

Test #22:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

1000
L.L....L.LLLL..LLLLLLL.LL.L...L..L..L.LLL..LL.LL..LL..LLL..L.LLLLL.LL..LLLL.LL..L.L....L..LL..LL..LLL..LLL..L...L..LLL..L..L..L.L.LL...L.LL..LLLLLLLLLL..L..LLL.LLL...L.L.L....LL....L.L.....LLL..L..LL..L.L...LLL.LLLL.LL.LL.LLLL.LLLL..L.LLLLL.L.L..LL.LL..LL..L.LL...LL.LLL.LL.LLL.LLL....L.L..LLL.L...

output:

L.L.CC.L.LLLL..LLLLLLL.LL.L.C.L..L..L.LLL..LL.LL..LL..LLL..L.LLLLL.LL..LLLL.LL..L.L.CC.L..LL..LL..LLL..LLL..L.C.L..LLL..L..L..L.L.LL.C.L.LL..LLLLLLLLLL..L..LLL.LLL.C.L.L.L.CC.LL.CC.L.L.CCC.LLL..L..LL..L.L.C.LLL.LLLL.LL.LL.LLLL.LLLL..L.LLLLL.L.L..LL.LL..LL..L.LL.C.LL.LLL.LL.LLL.LLL.CC.L.L..LLL.LL.L.L...

result:

ok "L.L.CC.L.LLLL..LLLLLLL.LL.L.C.....L.LLL.L.CCC.LL..LLL.C.LL.CCC.L"

Test #23:

score: 0
Accepted
time: 0ms
memory: 3576kb

input:

1000
LL.LLLL..LLL....LL.LL..LL..L......L..L.L.L.L......L.L.L.L.........L.LL.......L...L..L.LL....L..LL...LLLL....L.....LL...LLL.LL...LL.....L..L..LLL...LL..L.LLL..LLLL.L.LLLLL.L.LLLL.L..LL.L...L...L.L.L.L....L.LL..L...L.....L....LLL..L.L..LL.LLL.L....L.....L.L.L.L......L...L...L.LL......L.LLL.L.LLL....

output:

LL.LLLL..LLL.CC.LL.LL..LL..L.CCCC.L..L.L.L.L.CCCC.L.L.L.L.CCCCCCC.L.LL.CCCCC.L.C.L..L.LL.CC.L..LL.C.LLLL.CC.L.CCC.LL.C.LLL.LL.C.LL.CCC.L..L..LLL.C.LL..L.LLL..LLLL.L.LLLLL.L.LLLL.L..LL.L.C.L.C.L.L.L.L.CC.L.LL..L.C.L.CCC.L.CC.LLL..L.L..LL.LLL.L.CC.L.CCC.L.L.L.L.CCCC.L.C.L.C.L.LL.CCCC.L.LLL.L.LLL.CC.L....

result:

ok "LL.LLLL..LLL.CC.LL.LL..LL..L.C...LLLL.CC.L.LL.LLL.CCCCCCC.LLL.L."

Test #24:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

1000
...........L....L.L..........L.......L.....L..........................................L..L....L...L.......................................L........................................L...........L.L....L.........L.........L...L.......L..................L...L........L........L.....................L....

output:

CCCCCCCCCC.L.CC.L.L.CCCCCCCC.L.CCCCC.L.CCC.L.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.L..L.CC.L.C.L.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.L.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC.L.CCCCCCCCC.L.L.CC.L.CCCCCCC.L.CCCCCCC.L.C.L.CCCCC.L.CCCCCCCCCCCCCCCC.L.C.L.CCCCCC.L.CCCCCC.L.CCCCCCCCCCCCCCCCCCC.L.L.CCC...

result:

ok "CCCCCCCCCC.L.CC.L.L.CCCCCCCC.L...L.CCCCCCCCCCCCCCCCCCCCCCCCCCCCC"

Test #25:

score: 0
Accepted
time: 0ms
memory: 3752kb

input:

1000
..LL.L..L...L.L....L..L........LL.L...L..............L..LL....L..........LL......L.........L...L.L.....L.............LL....L....L.........L.L.....L..L....L.LL......L..........L..LL...L.............L...LL.L......LL........L.........L..L...LL...L.....L.........L..L.L.L.......L.L..........L..........

output:

C.LL.L..L.C.L.L.CC.L..L.CCCCCC.LL.L.C.L.CCCCCCCCCCCC.L..LL.CC.L.CCCCCCCC.LL.CCCC.L.CCCCCCC.L.C.L.L.CCC.L.CCCCCCCCCCC.LL.CC.L.CC.L.CCCCCCC.L.L.CCC.L..L.CC.L.LL.CCCC.L.CCCCCCCC.L..LL.C.L.CCCCCCCCCCC.L.C.LL.L.CCCC.LL.CCCCCC.L.CCCCCCC.L..L.C.LL.C.L.CCC.L.CCCCCCC.L..L.L.L.CCCCC.L.L.CCCCCCCC.L.CCCCCCCCCCC...

result:

ok "C.LL.L..L.C.L.L.CC.L..L.CCCCCC...CCCCCCCCCCCC.L..L.CCC.L.CCCCCCC"

Test #26:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

1000
...L.LLLL.LLLLLL..LL...L..LLLLL.LLLLL.L.LL.L..LL.L.LLLLLLLLLLLLL.LLLLLL...LLL.LL.L...LL.LLLL.LL.LL.LLLLLLLLL..LLLL.L.L...LLLLL.LLL.L..LLLLLLLLLLLLLL..L...LLL.L.L.LL.LLLLLL.LLLL.LLL.LLLLL..LLL.L.LLLLLL.L..LL.LL.L.LL....LLLL.LL.LL..L.LLL.L...LL.LLL.LL.LL.LL...LL.L.L...L.LL.LLLL.LLLLL.LL.LL..LL.L....

output:

CC.L.LLLL.LLLLLL..LL.C.L..LLLLL.LLLLL.L.LL.L..LL.L.LLLLLLLLLLLLL.LLLLLL.C.LLL.LL.L.C.LL.LLLL.LL.LL.LLLLLLLLL..LLLL.L.L.C.LLLLL.LLL.L..LLLLLLLLLLLLLL..L.C.LLL.L.L.LL.LLLLLL.LLLL.LLL.LLLLL..LLL.L.LLLLLL.L..LL.LL.L.LL.CC.LLLL.LL.LL..L.LLL.L.C.LL.LLL.LL.LL.LL.C.LL.L.L.C.L.LL.LLLL.LLLLL.LL.LL..LL.L.CCC.L...

result:

ok "CC.L.LLLL.LLLLLL..LL.C.L..LLLL...L.CCC.LL.LLLLLL..LLL..LLLLL..LL"

Test #27:

score: 0
Accepted
time: 0ms
memory: 3588kb

input:

1000
LLLL.LLL.LL.LLL.LL.LL.LLLLLL.LLL.LLLLLLLLL.L.L.LLLLLLLLL.LLL.LL.LLLLLLLLLLLLLLLLL.LL.L.LLL.LLLLLL.L.LL.LLLL.LLLLLLLLL..LLLLLLLL..L.LLLLLLLLL..LLLLLLLLL.LLLL.LLLL.L.LL.LLL.LLLLL.L.LLLLLLL..LLLL.LLLLLL..LL..L.L.LL.LLLLLLLLLLLLLLLLLLLLLL.LLL.LL.L.LLLLLL..LLLLL.LLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLL...

output:

LLLL.LLL.LL.LLL.LL.LL.LLLLLL.LLL.LLLLLLLLL.L.L.LLLLLLLLL.LLL.LL.LLLLLLLLLLLLLLLLL.LL.L.LLL.LLLLLL.L.LL.LLLL.LLLLLLLLL..LLLLLLLL..L.LLLLLLLLL..LLLLLLLLL.LLLL.LLLL.L.LL.LLL.LLLLL.L.LLLLLLL..LLLL.LLLLLL..LL..L.L.LL.LLLLLLLLLLLLLLLLLLLLLL.LLL.LL.L.LLLLLL..LLLLL.LLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLL.LLLL...

result:

ok "LLLL.LLL.LL.LLL.LL.LL.LLLLLL.L...LLLLLLL.LLLLLLL.LL.LLLLLL.LLLLL"

Test #28:

score: 0
Accepted
time: 0ms
memory: 3756kb

input:

1000
LLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLL.L.LLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LL.LLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LL.LLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLL....

output:

LLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLL.L.LLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LL.LLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LL.LLLLLLLLLLLL.LLLLLLL.LLLLLLLLLLLLLLLLLL.LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL.LLLLLLLLLL.LLLLL...

result:

ok "LLLL.LLLLLLLLLLLLLLLLLLLLLLLLL....LLL.LL.LLLLLLLL.LLLLLLLLLLLLLL"

Test #29:

score: 0
Accepted
time: 0ms
memory: 3752kb

input:

1000
.L.L...LLLL.L.LLL.LLLLL.L.LLLLL.L..........LL.L....LL.L.L.LL..LL.L.L.L..LL..LLL.LLL.L..L.L.L.LLL.L.L.L..LLLL..L...LLLLLL.LL..L....LLLL.LLLLLL...LL.L..L....LL.L.....LLL.LLLL.LL.LL...L..L.L.LL.L.L...LLL.LLLL.L.L.LL.L..LLLL.LLL.LL...LLL.L..L.L.L.LLLL..LL..L...LLLL.....L.LLL.LL..L.LLLLLLLLL...L.L.....

output:

.L.L.C.LLLL.L.LLL.LLLLL.L.LLLLL.L.CCCCCCCC.LL.L.CC.LL.L.L.LL..LL.L.L.L..LL..LLL.LLL.L..L.L.L.LLL.L.L.L..LLLL..L.C.LLLLLL.LL..L.CC.LLLL.LLLLLL.C.LL.L..L.CC.LL.L.CCC.LLL.LLLL.LL.LL.C.L..L.L.LL.L.L.C.LLL.LLLL.L.L.LL.L..LLLL.LLL.LL.C.LLL.L..L.L.L.LLLL..LL..L.C.LLLL.CCC.L.LLL.LL..L.LLLLLLLLL.C.L.L.C.L.LL...

result:

ok ".L.L.C.LLLL.L.LLL.LLLLL.L.LLLL...L..L.LL.C.L..L.LLLLL.LL.L.CCC.L"