QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#380421#5306. Da Mi Lao Shi Ai Kan Dekevinyang#AC ✓4ms3836kbC++207.7kb2024-04-07 03:30:542024-04-07 03:30:55

Judging History

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

  • [2024-04-07 03:30:55]
  • 评测
  • 测评结果:AC
  • 用时:4ms
  • 内存:3836kb
  • [2024-04-07 03:30:54]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

/* Macros {{{ */
/*  A lot of this is from some of Benq's submissions
    [https://codeforces.com/profile/Benq]
    Ugly af to the eyes, but with vim fold its barable
    Hopefully c++20 concepts can make all this stuff must cleaner */

/* Basics {{{ */
using ll = long long;
using ld = long double;
using str = string;

using pi = pair<int, int>;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
#define mp make_pair
#define fi first
#define se second

#define arr array
#define ve vector
using vi = vector<int>;
using vll = vector<ll>;
using vld = vector<ld>;

using vpi = vector<pi>;
using vpll = vector<pll>;
using vpld = vector<pld>;

using vvi = vector<vi>;
using vvll = vector<vll>;
using vvld = vector<vld>;

using vvpi = vector<vpi>;
using vvpll = vector<vpll>;
using vvpld = vector<vpld>;

#define pb push_back
#define lb lower_bound
#define ub upper_bound
#define sz size()
#define rsz(a) resize(a)
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()

#define For(i, a, b) for (int i = a; i < b; ++i)
#define Rof(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define rep(a) For(_, 0, a)
#define each(a, x) for (auto &a : x)
#define reach(a, x) for (auto a = x.rbegin(); a != x.rend(); ++a)

template <typename T, typename U>
inline void cmin(T &x, U y) {
    if (y < x) x = y;
}
template <typename T, typename U>
inline void cmax(T &x, U y) {
    if (x < y) x = y;
}
/*}}}*/

/* IO {{{ */

/* Template Macros {{{ */
#define tcT template <class T
#define tcTU tcT, class U
#define tcTUU tcT, class... U
/*}}}*/

inline namespace Helpers { /*{{{*/
tcT, class = void > struct is_iterable : false_type {};
tcT > struct is_iterable<
          T, void_t<decltype(begin(declval<T>())), decltype(end(declval<T>()))>>
    : true_type {};
tcT > constexpr bool is_iterable_v = is_iterable<T>::value;

tcT, class = void > struct is_readable : false_type {};
tcT > struct is_readable<T, typename std::enable_if_t<is_same_v<
                                decltype(cin >> declval<T &>()), istream &>>>
    : true_type {};
tcT > constexpr bool is_readable_v = is_readable<T>::value;

tcT, class = void > struct is_printable : false_type {};
tcT > struct is_printable<T, typename std::enable_if_t<is_same_v<
                                 decltype(cout << declval<T>()), ostream &>>>
    : true_type {};
tcT > constexpr bool is_printable_v = is_printable<T>::value;
} /* namespace Helpers */
/*}}}*/

inline namespace Input { /*{{{*/
tcT > constexpr bool needs_input_v = !is_readable_v<T> && is_iterable_v<T>;
tcTUU > void re(T &t, U &...u);
tcTU > void re(pair<T, U> &p); /* pairs */

/* re: read{{{ */
tcT > typename enable_if<is_readable_v<T>, void>::type re(T &x) {
    cin >> x;
} /* default */
tcT > typename enable_if<needs_input_v<T>, void>::type re(
          T &i);                                   // vectors, arrays, etc...
tcTU > void re(pair<T, U> &p) { re(p.fi, p.se); }  // pairs
tcT > typename enable_if<needs_input_v<T>, void>::type re(T &i) {
    each(x, i) re(x);
}
tcTUU > void re(T &t, U &...u) {
    re(t);
    re(u...);
} /* read multiple}}} */

/* rv: resize and read vectors{{{ */
void rv(size_t) {}
tcTUU > void rv(size_t N, ve<T> &t, U &...u);
template <class... U>
void rv(size_t, size_t N2, U &...u);
tcTUU > void rv(size_t N, ve<T> &t, U &...u) {
    t.rsz(N);
    re(t);
    rv(N, u...);
}
template <class... U>
void rv(size_t, size_t N2, U &...u) {
    rv(N2, u...);
} /*}}}*/

/* dumb shortcuts to read in ints{{{ */
void decrement() {} /* subtract one from each */
tcTUU > void decrement(T &t, U &...u) {
    --t;
    decrement(u...);
}
#define ints(...)    \
    int __VA_ARGS__; \
    re(__VA_ARGS__);
#define int1(...)      \
    ints(__VA_ARGS__); \
    decrement(__VA_ARGS__); /*}}}*/
} /* namespace Input */
/*}}}*/

inline namespace ToString { /*{{{*/
tcT > constexpr bool needs_output_v = !is_printable_v<T> && is_iterable_v<T>;

/* ts: string representation to print */
tcT > typename enable_if<is_printable_v<T>, str>::type ts(T v) {
    stringstream ss;
    ss << fixed << setprecision(15) << v;
    return ss.str();
} /* default */
tcT > str bit_vec(T t) { /* bit vector to string */
    str res = "{";
    For(i, 0, t.sz) res += ts(t[i]);
    res += "}";
    return res;
}
str ts(ve<bool> v) { return bit_vec(v); }
template <size_t SZ>
str ts(bitset<SZ> b) {
    return bit_vec(b);
} /* bit vector */
tcTU > str ts(pair<T, U> p); /* pairs */
tcT > typename enable_if<needs_output_v<T>, str>::type ts(
          T v); /* vectors, arrays */
tcTU > str ts(pair<T, U> p) { return "(" + ts(p.fi) + ", " + ts(p.se) + ")"; }
tcT > typename enable_if<is_iterable_v<T>, str>::type ts_sep(T v, str sep) {
    /* convert container to string w/ separator sep */
    bool fst = 1;
    str res = "";
    for (const auto &x : v) {
        if (!fst) res += sep;
        fst = 0;
        res += ts(x);
    }
    return res;
}
tcT > typename enable_if<needs_output_v<T>, str>::type ts(T v) {
    return "{" + ts_sep(v, ", ") + "}";
}

/* for nested DS */
template <int, class T>
typename enable_if<!needs_output_v<T>, ve<str>>::type ts_lev(const T &v) {
    return {ts(v)};
}
template <int lev, class T>
typename enable_if<needs_output_v<T>, ve<str>>::type ts_lev(const T &v) {
    if (lev == 0 || !v.sz) return {ts(v)};
    ve<str> res;
    for (const auto &t : v) {
        if (res.sz) res.back() += ",";
        ve<str> tmp = ts_lev<lev - 1>(t);
        res.insert(end(res), all(tmp));
    }
    For(i, 0, res.sz) {
        str bef = " ";
        if (i == 0) bef = "{";
        res[i] = bef + res[i];
    }
    res.back() += "}";
    return res;
}
} /* namespace ToString */
/*}}}*/

inline namespace Output { /*{{{*/
template <class T>
void pr_sep(ostream &os, str, const T &t) {
    os << ts(t);
}
template <class T, class... U>
void pr_sep(ostream &os, str sep, const T &t, const U &...u) {
    pr_sep(os, sep, t);
    os << sep;
    pr_sep(os, sep, u...);
}
/* print w/ no spaces */
template <class... T>
void pr(const T &...t) {
    pr_sep(cout, "", t...);
}
/* print w/ spaces, end with newline */
void ps() { cout << "\n"; }
template <class... T>
void ps(const T &...t) {
    pr_sep(cout, " ", t...);
    ps();
}
/* debug to cerr */
template <class... T>
void dbg_out(const T &...t) {
    pr_sep(cerr, " | ", t...);
    cerr << endl;
}
void loc_info(int line, str names) {
    cerr << "Line(" << line << ") -> [" << names << "]: ";
}
template <int lev, class T>
void dbgl_out(const T &t) {
    cerr << "\n\n" << ts_sep(ts_lev<lev>(t), "\n") << "\n" << endl;
}
} /* namespace Output */
/*}}}}}}}}}*/

int n, k;
str s;

void solve() {
    re(n);

    set<str> seen;
    rep(n) {
        re(k);

        int cnt = 0;

        rep(k) {
            re(s);

            int flag = 0;
            for(int i=0; i+2 < s.size(); ++i)
                flag |= (s[i] == 'b' && s[i+1] == 'i' && s[i+2] == 'e');

            if(flag && !seen.count(s)) {
                seen.insert(s);
                ++cnt;
                ps(s);
            }
        }

        if(cnt == 0) {
            ps("Time to play Genshin Impact, Teacher Rice!");
        }

    }
}

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

    /* cout << fixed << setprecision(6); */
    int t = 1;
    // cin >> t;
    for (int i = 0; i < t; i++) solve();

    return 0;
    // you should actually read the stuff at the bottom
}

/* stuff you should look for
 * int overflow, array bounds
 * special cases (n=1?)
 * do smth instead of nothing and stay organized
 * WRITE STUFF DOWN
 * DON'T GET STUCK ON ONE APPROACH
 */

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

6
1
biebie
1
adwlknafdoaihfawofd
3
ap
ql
biebie
2
pbpbpbpbpbpbpbpb
bbbbbbbbbbie
0
3
abie
bbie
cbie

output:

biebie
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
bbbbbbbbbbie
Time to play Genshin Impact, Teacher Rice!
abie
bbie
cbie

result:

ok 8 lines

Test #2:

score: 0
Accepted
time: 4ms
memory: 3832kb

input:

10000
3
g
a
a
2
t
a
1
l
0
0
1
a
3
h
m
g
2
b
g
1
g
0
2
a
a
0
1
a
1
e
0
1
a
1
g
0
1
c
1
a
1
d
1
h
2
a
g
0
1
i
0
1
z
1
a
2
z
d
1
l
1
g
0
2
e
h
3
a
a
a
1
e
0
2
b
a
2
e
a
1
r
1
c
5
z
a
r
k
e
0
2
c
a
1
z
2
g
d
1
e
2
g
g
0
2
e
e
0
1
a
0
1
h
0
1
c
1
a
1
b
0
1
b
1
b
1
a
4
a
z
e
i
0
1
e
0
0
0
1
e
2
x
g
1
c
1
...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!...

result:

ok 10000 lines

Test #3:

score: 0
Accepted
time: 3ms
memory: 3772kb

input:

10000
1
dd
0
0
1
nv
1
in
1
hl
0
1
tt
0
0
0
1
bc
0
0
2
nn
ij
0
0
2
tt
dd
0
0
1
in
0
1
au
0
0
1
ho
1
hc
0
0
1
df
0
1
hk
0
0
0
1
ah
0
0
1
ie
0
0
1
cc
0
1
mc
0
1
ie
0
0
1
el
0
1
bc
0
0
0
1
dd
1
ob
3
ew
ab
ij
0
0
1
ij
0
0
1
ik
0
0
1
ab
0
1
ak
1
vw
0
0
0
0
1
ew
0
1
uj
0
1
cc
0
1
vw
1
ii
0
1
tt
0
0
0
1
bc
...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!...

result:

ok 10000 lines

Test #4:

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

input:

10000
0
0
0
0
1
lel
1
ffq
0
0
0
1
abc
0
0
0
0
1
nyn
0
0
0
1
bie
0
0
1
abb
0
0
1
bie
0
0
0
1
bie
0
0
1
bie
1
bie
0
1
bie
0
1
npi
1
bie
0
0
0
0
1
sws
0
0
1
ysy
0
0
1
abc
0
1
wjw
0
1
ccc
0
1
aia
0
1
aia
0
1
ioi
0
1
bie
0
0
0
0
0
0
1
bie
0
1
bie
0
1
bie
0
0
1
bkb
0
1
bie
0
0
0
0
1
abc
0
0
0
1
mum
0
0
1
...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!...

result:

ok 10000 lines

Test #5:

score: 0
Accepted
time: 3ms
memory: 3636kb

input:

10000
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!...

result:

ok 10000 lines

Test #6:

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

input:

10000
0
0
0
0
0
0
0
0
0
0
0
0
1
abcbbieebbcbieiebc
0
0
0
0
0
0
0
0
0
1
iitii
0
0
0
0
0
0
0
0
0
0
0
0
1
dbibie
0
0
0
0
0
0
1
tatbietxtatc
0
0
0
0
0
0
0
0
0
0
0
0
1
ab
0
0
0
0
0
0
0
0
0
0
0
0
1
bbiejbibie
0
0
0
0
0
0
0
0
0
0
1
bievdbieed
0
0
0
0
0
0
0
0
1
tatbietxtatc
0
0
0
0
0
0
0
0
0
1
cdcdcdcdcdcdc...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!...

result:

ok 10000 lines

Test #7:

score: 0
Accepted
time: 3ms
memory: 3568kb

input:

10000
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
kmkikmkekmkikmknkmkikmke
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
abbiecdacbiedabcbcdacdabdabiebcdc
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
sgsesgsbs...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!...

result:

ok 10000 lines

Test #8:

score: 0
Accepted
time: 3ms
memory: 3836kb

input:

10000
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
oqnj
0
0
0
0
0
0
0
0
1
dmmmdmdmm
0
0
0
0
0
0
0
0
0
0
0
1
bie
0
0
0
1
svbieeie
0
0
0
0
0
0
0
0
0
0
0
0
1
bibieiesr
0
0
0
0
0
0
0
0
0
1
mmmmmmmx
0
0
0
1
bieiebiey
0
0
0
1
bbie
0
0
0
0
0
0
0
0
1
bbie
0
0
0
0
0
1
oqnj
0
0
0
0
0
0
0
0
0
0
0
1
ndnd
0
0
0
0
0
0
0
0
0
0
0...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!...

result:

ok 10000 lines

Test #9:

score: 0
Accepted
time: 3ms
memory: 3608kb

input:

10000
0
0
1
biee
0
0
0
1
atay
0
0
0
0
0
1
atay
0
0
0
1
bbie
0
0
0
0
1
gbbie
1
bieyno
0
0
0
0
0
1
biee
1
kskwk
0
0
1
zbie
0
0
0
0
0
0
1
tbibie
0
0
1
biee
0
0
0
0
1
abbie
0
0
1
xhhh
0
1
biebie
0
1
bie
0
0
0
0
0
0
1
bie
0
0
0
0
0
1
biebie
0
0
0
0
1
tptb
0
0
0
0
0
0
0
1
bibxbi
0
0
0
0
0
1
bief
0
1
nrnt
...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
biee
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher ...

result:

ok 10000 lines

Test #10:

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

input:

10000
0
0
0
0
0
1
ghgghghggh
0
0
0
1
fls
0
0
0
0
0
1
imbiebieie
0
0
0
0
0
0
0
0
0
0
0
1
jbieieeha
0
0
0
0
0
0
0
0
1
bbbie
0
0
0
0
0
0
0
1
bbbiehfbie
0
0
0
0
0
0
0
0
0
1
abcbcac
0
0
0
0
0
0
0
0
0
0
0
0
0
1
bie
0
0
0
0
0
0
1
ab
0
0
0
0
0
1
abbabb
0
0
0
0
0
0
0
0
0
1
bieiebieb
0
0
0
0
0
0
0
1
gbllgbllg...

output:

Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!...

result:

ok 10000 lines

Test #11:

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

input:

100
7
tttttbiebietbied
cbacbiebacbacb
uruururuuruururuu
abbabaabbaa
uouguouquouguouku
fff
abbieedbiebieabcbc
9
bieiee
uruururuuruururuu
uruururuuruururuu
biessbiess
ypyhypybieehy
tvtotvtztvtotvtitvt
fff
ypyhypybieehy
abbiebcdeacbiebdeabc
14
biessbiess
ffrrfffuhff
bibiee
abbiebcdeacbiebdeabc
dddddddd...

output:

tttttbiebietbied
cbacbiebacbacb
abbieedbiebieabcbc
bieiee
biessbiess
ypyhypybieehy
abbiebcdeacbiebdeabc
bibiee
hgbiegbiegdmhgdmhgd
biebiek
hbiehphhphbiehph
biee
bmbpbie
biejlbielt
bbieeieebieebieebiee
bbie
abcbibieea
lbiel
mpbiep
bieee
biebccccaa
abbiebaba
Time to play Genshin Impact, Teacher Rice!
...

result:

ok 115 lines

Test #12:

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

input:

100
7
dalpigmbjnpdalpigmbjnpdalpigmbjnpdalp
abieeacabbcbiebabieababcbbiec
beabdebbbaabddbecffcabfebeabde
nonhnonknonhnonynonhnon
abcbcacabbcacababccbiebcbcabcacbiebc
beabdebbbaabddbecffcabfebeabde
cdablkjdgcllcgaaglbiebbiedfc
9
fzffffbiefbiezz
dalpigmbjnpdalpigmbjnpdalpigmbjnpdalp
aaaaaaaaaaaaaaaaaa...

output:

abieeacabbcbiebabieababcbbiec
abcbcacabbcacababccbiebcbcabcacbiebc
cdablkjdgcllcgaaglbiebbiedfc
fzffffbiefbiezz
nfnybieunfnynfbiefnynbienfnyn
oqoroqoioqoroqovoqorbieibieroqot
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Ri...

result:

ok 107 lines

Test #13:

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

input:

100
11
wwiiwiio
bie
mmemmeme
lvvvvvvvm
biebiec
bibienk
fwffwfw
kgidkgi
bie
ccc
kgidkgi
22
xgxmx
clvllk
abcbcaca
biez
bibienk
abaaba
rxrtrx
uwcii
bieiedbie
wywwyw
abbieee
tat
alam
abiec
bie
eieei
abcdb
abbaba
cec
bieieo
bie
cbbbbbaac
3
bibie
bie
abcbie
0
3
bieee
abcdb
xgxmx
2
jvjzjvjj
rxrrxr
11
abcbc...

output:

bie
biebiec
bibienk
biez
bieiedbie
abbieee
abiec
bieieo
bibie
abcbie
Time to play Genshin Impact, Teacher Rice!
bieee
Time to play Genshin Impact, Teacher Rice!
abcbcbieb
cbiexbiec
bbie
gpgbiebie
gbiee
bibibie
bbiee
ubiebieeu
ebibbie
abcdbieie
bbieq
abieee
biebieie
dcabieec
abcbibie
biee
wbbieeie
fb...

result:

ok 118 lines

Test #14:

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

input:

100
23
bie
dsdx
dlldde
cvcyc
bie
bbie
bieek
ibiei
efefe
gbbieg
bieeb
eieje
kgl
bbbie
biek
dad
babb
bbie
cgci
bbbb
bieve
sesc
gbbieg
2
bie
bieek
42
yby
hvh
bbbb
bie
bbie
kgl
pmpb
abc
tbie
bbie
bieiey
dsdx
biebie
fofhfo
dduudu
bie
bie
efefe
bie
bbbie
epe
bieek
abcdb
eheye
bie
bieepc
fmfq
biebie
babb
e...

output:

bie
bbie
bieek
ibiei
gbbieg
bieeb
bbbie
biek
bieve
Time to play Genshin Impact, Teacher Rice!
tbie
bieiey
biebie
bieepc
lbibie
Time to play Genshin Impact, Teacher Rice!
Time to play Genshin Impact, Teacher Rice!
bieee
bibie
wbie
bieiej
bieieh
bbibie
bbiee
Time to play Genshin Impact, Teacher Rice!
...

result:

ok 119 lines

Test #15:

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

input:

100
7
biee
gq
abbaba
bibiee
bccbccbc
yjy
kjk
26
zuzybie
ab
pspzps
bbibiee
xbxtxbxix
ejepeje
bbiebie
kikk
abcdbcbie
kcktkckxk
bbiebie
ibbie
ii
obieuo
sssx
awala
ddbibiedd
acawaca
abcdbcdacd
di
dbibie
jyjn
biebiee
abcdeb
ikiwik
aabaa
9
bubbub
iriyir
sbies
bie
en
bie
sbies
abbab
cclczh
16
bbibiec
bbieb...

output:

biee
bibiee
zuzybie
bbibiee
bbiebie
abcdbcbie
ibbie
obieuo
ddbibiedd
dbibie
biebiee
sbies
bie
bbibiec
kbiekk
biebbbie
bieieyy
abieeb
ooflbbiee
abieiea
bieebie
mbieibie
xbiee
bieee
bibie
abieb
bieeie
bieie
hhbiekhhc
ppbie
hobiebieo
bbie
rbieieenr
obiebieoox
bieieeeee
obieo
bieebiebie
bieawnwdwn
Time ...

result:

ok 187 lines