QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#802352#9871. Just another Sorting Problemucup-team055#AC ✓5ms4052kbC++237.6kb2024-12-07 13:29:522024-12-07 13:29:52

Judging History

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

  • [2024-12-07 13:29:52]
  • 评测
  • 测评结果:AC
  • 用时:5ms
  • 内存:4052kb
  • [2024-12-07 13:29:52]
  • 提交

answer

#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
namespace{
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uint = unsigned;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<ld, ld>;
using tuplis = array<ll, 3>;
template<class T> using pq = priority_queue<T, vector<T>, greater<T>>;
const ll LINF=0x1fffffffffffffff;
const ll MINF=0x7fffffffffff;
const int INF=0x3fffffff;
const int MOD=1000000007;
const int MODD=998244353;
const ld DINF=INFINITY;
const ld EPS=1e-9;
const ld PI=3.14159265358979323846;
const ll dx[] = {0, 1, 0, -1, 1, -1, 1, -1};
const ll dy[] = {1, 0, -1, 0, 1, 1, -1, -1};
#define overload5(a,b,c,d,e,name,...) name
#define overload4(a,b,c,d,name,...) name
#define overload3(a,b,c,name,...) name
#define rep1(n) rep2(_,n)
#define rep2(i,n) for(ll i=0;i<n;++i)
#define rep3(i,a,b) for(ll i=a;i<b;++i)
#define rep4(i,a,b,c) for(ll i=a;i<b;i+=c)
#define rep(...) overload4(__VA_ARGS__,rep4,rep3,rep2,rep1)(__VA_ARGS__)
#define rrep1(n) for(ll i=n;i--;)
#define rrep2(i,n) for(ll i=n;i--;)
#define rrep3(i,a,b) for(ll i=b;i-->(a);)
#define rrep4(i,a,b,c) for(ll i=(a)+((b)-(a)-1)/(c)*(c);i>=(a);i-=c)
#define rrep(...) overload4(__VA_ARGS__,rrep4,rrep3,rrep2,rrep1)(__VA_ARGS__)
#define each1(i,a) for(auto&&i:a)
#define each2(x,y,a) for(auto&&[x,y]:a)
#define each3(x,y,z,a) for(auto&&[x,y,z]:a)
#define each4(w,x,y,z,a) for(auto&&[w,x,y,z]:a)
#define each(...) overload5(__VA_ARGS__,each4,each3,each2,each1)(__VA_ARGS__)
#define all1(i) begin(i),end(i)
#define all2(i,a) begin(i),begin(i)+a
#define all3(i,a,b) begin(i)+a,begin(i)+b
#define all(...) overload3(__VA_ARGS__,all3,all2,all1)(__VA_ARGS__)
#define rall1(i) rbegin(i),rend(i)
#define rall2(i,a) rbegin(i),rbegin(i)+a
#define rall3(i,a,b) rbegin(i)+a,rbegin(i)+b
#define rall(...) overload3(__VA_ARGS__,rall3,rall2,rall1)(__VA_ARGS__)
#define sum(...) accumulate(all(__VA_ARGS__),0LL)
#define dsum(...) accumulate(all(__VA_ARGS__),0.0L)
#define Msum(...) accumulate(all(__VA_ARGS__),mint{})
#define elif else if
#define INT(...) int __VA_ARGS__;in(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__;in(__VA_ARGS__)
#define ULL(...) ull __VA_ARGS__;in(__VA_ARGS__)
#define STR(...) string __VA_ARGS__;in(__VA_ARGS__)
#define CHR(...) char __VA_ARGS__;in(__VA_ARGS__)
#define DBL(...) double __VA_ARGS__;in(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__;in(__VA_ARGS__)
#define vec(type,name,...) vector<type>name(__VA_ARGS__)
#define VEC(type,name,size) vector<type>name(size);in(name)
#define vv(type,name,h,...) vector name(h,vector<type>(__VA_ARGS__))
#define VV(type,name,h,w) vector name(h,vector<type>(w));in(name)
#define vvv(type,name,h,w,...) vector name(h,vector(w,vector<type>(__VA_ARGS__)))
template<class T> ll sz(const T& a){ return size(a); }
template<class T, class U> ll count(const T& a, const U& b){ return count(all(a), b); }
template<class T, class F> ll count_if(const T& a, F b){ return count_if(all(a), b); }
template<class T, class F> void filter(T& a, F b){ a.erase(remove_if(all(a), not_fn(b)), a.end()); }
template<class T, class F = less<>> void sor(T& a, F b = F{}){ sort(all(a), b); }
template<class T> void rev(T& a){ reverse(all(a)); }
template<class T> void uniq(T& a){ sor(a); a.erase(unique(all(a)), end(a)); }
ll popcnt(ull a){ return __builtin_popcountll(a); }
ll intpow(ll a, ll b){ ll ans = 1; while(b){ if(b & 1) ans *= a; a *= a; b /= 2; } return ans; }
ll modpow(ll a, ll b, ll p){ ll ans = 1; while(b){ if(b & 1) (ans *= a) %= p; (a *= a) %= p; b /= 2; } return ans; }
template<class T> T div_floor(T a, T b) { return a / b - ((a ^ b) < 0 && a % b); }
template<class T> T div_ceil(T a, T b) { return a / b + ((a ^ b) > 0 && a % b); }
template<class T> bool chmin(T& a, const T& b){ return a > b ? a = b, 1 : 0; }
template<class T> bool chmax(T& a, const T& b){ return a < b ? a = b, 1 : 0; }
template<class T, class U> bool chmin(T& a, const U& b){ return a > b ? a = b, 1 : 0; }
template<class T, class U> bool chmax(T& a, const U& b){ return a < b ? a = b, 1 : 0; }
vector<ll> iota(ll n, ll begin = 0){ vector<ll> a(n); iota(a.begin(), a.end(), begin); return a; }
vector<pll> factor(ull x){ vector<pll> ans; for(ull i = 2; i * i <= x; i++) if(x % i == 0){ ans.push_back({i, 1}); while((x /= i) % i == 0) ans.back().second++; } if(x != 1) ans.push_back({x, 1}); return ans; }
vector<ll> divisor(ull x){ vector<ll> ans; for(ull i = 1; i * i <= x; i++) if(x % i == 0) ans.push_back(i); rrep(ans.size() - (ans.back() * ans.back() == x)) ans.push_back(x / ans[i]); return ans; }
template<class T> unordered_map<T, ll> press(vector<T> a){ uniq(a); unordered_map<T, ll> ans; rep(i, a.size()) ans[a[i]] = i; return ans; }
template<class T> auto run_press(const T& a){ vector<pair<decay_t<decltype(a[0])>, ll>> ans; each(x, a){ if(ans.empty() || ans.back().first != x) ans.emplace_back(x, 1); else ans.back().second++; } return ans; }
template<class... Ts> void in(Ts&... t);
[[maybe_unused]] void print(){}
template<class T, class... Ts> void print(const T& t, const Ts&... ts);
template<class... Ts> void out(const Ts&... ts){ print(ts...); cout << '\n'; }
namespace IO{
#define VOID(a) decltype(void(a))
struct S{ S(){ cin.tie(nullptr)->sync_with_stdio(0); fixed(cout).precision(12); } }S;
template<int I> struct P : P<I-1>{};
template<> struct P<0>{};
template<class T> void i(T& t){ i(t, P<3>{}); }
void i(vector<bool>::reference t, P<3>){ int a; i(a); t = a; }
template<class T> auto i(T& t, P<2>) -> VOID(cin >> t){ cin >> t; }
template<class T> auto i(T& t, P<1>) -> VOID(begin(t)){ for(auto&& x : t) i(x); }
template<class T, size_t... idx> void ituple(T& t, index_sequence<idx...>){ in(get<idx>(t)...); }
template<class T> auto i(T& t, P<0>) -> VOID(tuple_size<T>{}){ ituple(t, make_index_sequence<tuple_size<T>::value>{}); }
template<class T> void o(const T& t){ o(t, P<4>{}); }
template<size_t N> void o(const char (&t)[N], P<4>){ cout << t; }
template<class T, size_t N> void o(const T (&t)[N], P<3>){ o(t[0]); for(size_t i = 1; i < N; i++){ o(' '); o(t[i]); } }
template<class T> auto o(const T& t, P<2>) -> VOID(cout << t){ cout << t; }
template<class T> auto o(const T& t, P<1>) -> VOID(begin(t)){ bool first = 1; for(auto&& x : t) { if(first) first = 0; else o(' '); o(x); } }
template<class T, size_t... idx> void otuple(const T& t, index_sequence<idx...>){ print(get<idx>(t)...); }
template<class T> auto o(T& t, P<0>) -> VOID(tuple_size<T>{}){ otuple(t, make_index_sequence<tuple_size<T>::value>{}); }
#undef VOID
}
#define unpack(a) (void)(0 + ... + (a, 0))
template<class... Ts> void in(Ts&... t){ unpack(IO::i(t)); }
template<class T, class... Ts> void print(const T& t, const Ts&... ts){ IO::o(t); unpack(IO::o((cout << ' ', ts))); }
#undef unpack
#ifdef DEBUG
ll __lg(ull x){ return 63 - __builtin_clzll(x); }
#define debug(...) { print(#__VA_ARGS__); print(":"); out(__VA_ARGS__); }
#else
#define debug(...) void(0)
#endif
#define YESNO(yes,no) void yes(bool i = 1){ out(i?#yes:#no); } void no(){ out(#no); }
YESNO(first, second)
YESNO(First, Second)
YESNO(Yes, No)
YESNO(YES, NO)
YESNO(possible, impossible)
YESNO(Possible, Impossible)
YESNO(POSSIBLE, IMPOSSIBLE)



void solve(){
    LL(n);
    STR(first);
    VEC(ll,a,n);
    if(n==2){
        return out("Alice");
    }
    if(n==3){
        if(first=="Alice")swap(a[0],a[1]);
        rep(i,3)a[i]-=i+1;
        if(ranges::count(a,0)==1)return out("Bob");
        else return out("Alice");
    }
    rep(i,n)a[i]-=i+1;
    if(first=="Alice"&&ranges::count(a,0)==n-2)return out("Alice");
    return out("Bob");
}
}
int main(){
    ll t = 1;
    in(t);
    rep(i,t){
        solve();
    }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
2 Alice
2 1
3 Bob
1 3 2
10 Bob
1 2 3 4 5 6 7 8 10 9

output:

Alice
Bob
Bob

result:

ok 3 lines

Test #2:

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

input:

2
2 Alice
2 1
2 Bob
2 1

output:

Alice
Alice

result:

ok 2 lines

Test #3:

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

input:

10
3 Bob
2 3 1
3 Alice
3 1 2
3 Bob
3 1 2
3 Alice
1 3 2
3 Alice
3 2 1
3 Bob
2 1 3
3 Bob
1 3 2
3 Alice
2 1 3
3 Alice
2 3 1
3 Bob
3 2 1

output:

Alice
Bob
Alice
Alice
Alice
Bob
Bob
Alice
Bob
Bob

result:

ok 10 lines

Test #4:

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

input:

46
4 Alice
4 1 3 2
4 Bob
4 1 3 2
4 Bob
3 2 4 1
4 Bob
2 4 1 3
4 Bob
1 4 3 2
4 Bob
4 1 2 3
4 Alice
1 2 4 3
4 Alice
3 2 1 4
4 Bob
2 1 4 3
4 Bob
4 3 1 2
4 Alice
1 3 2 4
4 Bob
3 1 4 2
4 Bob
1 3 2 4
4 Alice
2 4 1 3
4 Bob
2 1 3 4
4 Alice
2 1 3 4
4 Bob
4 2 3 1
4 Bob
3 4 2 1
4 Alice
4 1 2 3
4 Bob
2 4 3 1
4 B...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob

result:

ok 46 lines

Test #5:

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

input:

238
5 Alice
5 4 2 1 3
5 Bob
1 4 5 3 2
5 Bob
3 1 4 5 2
5 Alice
1 4 2 5 3
5 Bob
3 2 5 4 1
5 Alice
1 3 4 2 5
5 Bob
2 3 4 5 1
5 Bob
1 4 3 2 5
5 Bob
2 4 1 3 5
5 Bob
3 4 2 5 1
5 Alice
5 3 2 1 4
5 Bob
1 2 4 3 5
5 Alice
1 4 5 2 3
5 Alice
5 3 4 1 2
5 Alice
3 4 2 1 5
5 Alice
2 5 1 4 3
5 Alice
1 3 5 4 2
5 Alic...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
...

result:

ok 238 lines

Test #6:

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

input:

1438
6 Alice
1 2 4 3 6 5
6 Bob
2 4 3 1 5 6
6 Alice
4 3 6 2 5 1
6 Alice
5 3 6 1 2 4
6 Bob
3 1 2 4 5 6
6 Bob
5 4 2 3 6 1
6 Bob
3 2 1 5 4 6
6 Alice
1 5 3 6 2 4
6 Bob
2 1 3 5 6 4
6 Alice
5 4 2 6 1 3
6 Bob
6 3 2 4 1 5
6 Bob
6 3 4 5 2 1
6 Bob
5 3 1 4 6 2
6 Bob
5 6 3 2 4 1
6 Alice
4 3 5 1 2 6
6 Alice
5 2 1...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
...

result:

ok 1438 lines

Test #7:

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

input:

10000
7 Alice
5 6 3 1 2 4 7
7 Bob
5 1 4 3 7 6 2
7 Bob
2 5 1 7 4 6 3
7 Alice
3 1 5 6 7 2 4
7 Alice
1 7 3 2 4 6 5
7 Alice
2 4 7 5 6 1 3
7 Alice
7 3 6 1 2 5 4
7 Alice
4 1 6 5 2 7 3
7 Bob
6 2 3 1 7 4 5
7 Bob
1 7 4 3 6 5 2
7 Bob
7 3 1 4 2 6 5
7 Alice
3 5 7 6 2 4 1
7 Alice
6 7 5 2 1 4 3
7 Bob
7 5 1 4 6 3 ...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
...

result:

ok 10000 lines

Test #8:

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

input:

10000
8 Alice
4 2 1 8 3 6 5 7
8 Bob
6 2 7 1 3 5 4 8
8 Alice
5 8 1 6 7 2 3 4
8 Bob
5 8 1 3 4 7 2 6
8 Alice
4 7 6 5 3 8 2 1
8 Bob
7 2 6 5 4 1 8 3
8 Bob
5 8 7 4 2 3 6 1
8 Bob
3 8 2 5 7 6 4 1
8 Bob
6 1 5 3 2 8 7 4
8 Bob
4 5 7 8 2 3 1 6
8 Alice
3 8 5 6 2 1 4 7
8 Alice
8 1 3 4 7 5 2 6
8 Alice
2 8 4 3 7 6 ...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
...

result:

ok 10000 lines

Test #9:

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

input:

10000
9 Bob
8 7 1 5 4 2 9 6 3
9 Alice
3 6 2 1 5 7 9 8 4
9 Alice
7 9 3 6 8 5 1 4 2
9 Alice
4 7 8 3 1 2 6 9 5
9 Alice
9 7 2 8 1 4 5 3 6
9 Alice
6 2 9 8 1 5 3 7 4
9 Alice
7 1 5 3 4 6 8 9 2
9 Bob
1 3 7 8 2 4 9 6 5
9 Alice
1 9 8 6 7 3 2 4 5
9 Alice
4 3 8 5 6 9 1 2 7
9 Bob
1 2 7 3 4 9 8 5 6
9 Alice
9 3 1 ...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
...

result:

ok 10000 lines

Test #10:

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

input:

10000
10 Bob
10 5 1 4 8 3 2 6 9 7
10 Alice
6 8 5 3 10 7 4 2 1 9
10 Bob
1 4 2 9 7 8 3 10 5 6
10 Bob
10 2 6 9 1 5 8 7 4 3
10 Bob
3 4 9 8 10 6 5 2 1 7
10 Alice
6 3 4 10 2 5 1 9 8 7
10 Bob
3 9 2 7 4 8 10 5 1 6
10 Alice
6 8 3 10 5 7 1 2 4 9
10 Bob
9 10 2 6 5 4 7 3 8 1
10 Alice
4 6 3 1 2 9 8 10 7 5
10 Bob...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
...

result:

ok 10000 lines

Test #11:

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

input:

1000
100 Alice
1 2 3 4 5 6 7 8 9 24 11 12 13 14 15 16 17 18 19 20 21 22 23 10 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...

output:

Alice
Alice
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Alice
Alice
Bob
...

result:

ok 1000 lines

Test #12:

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

input:

100
1000 Bob
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Bob
Alice
Bob
Bob
Bob
Bob
Bob
Alice
Alice
Bob
Alice
Bob
Bob
Bob
Alice
Alice
Bob
...

result:

ok 100 lines

Test #13:

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

input:

10
10000 Bob
1902 2494 8486 9389 6347 8536 3762 3042 572 1386 793 3801 9657 1153 2769 3889 963 5009 8630 4574 3977 5532 8188 9478 5427 207 3640 6530 4695 4122 8179 4708 778 7771 3770 7715 8319 5188 8724 3389 2683 2317 2811 2261 1258 4291 2310 7694 9488 6457 8001 9997 4017 5146 1276 2692 9110 1182 68...

output:

Bob
Bob
Bob
Bob
Bob
Bob
Bob
Bob
Alice
Alice

result:

ok 10 lines

Test #14:

score: 0
Accepted
time: 5ms
memory: 3920kb

input:

1
100000 Bob
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99...

output:

Bob

result:

ok single line: 'Bob'

Test #15:

score: 0
Accepted
time: 5ms
memory: 3904kb

input:

1
100000 Alice
87870 65653 72129 93082 43620 83771 15352 47792 24229 88660 26573 21862 37547 48534 29977 92083 80025 50811 37078 69117 32850 42488 16021 41977 9549 52797 24292 92839 55290 4681 30018 18428 69696 13806 93653 28725 57447 41781 20125 898 86433 95123 69284 59083 52024 14300 4057 17624 43...

output:

Bob

result:

ok single line: 'Bob'

Test #16:

score: 0
Accepted
time: 5ms
memory: 3828kb

input:

1
100000 Alice
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...

output:

Alice

result:

ok single line: 'Alice'

Test #17:

score: 0
Accepted
time: 5ms
memory: 3900kb

input:

1
100000 Alice
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 ...

output:

Alice

result:

ok single line: 'Alice'

Test #18:

score: 0
Accepted
time: 5ms
memory: 4052kb

input:

1
100000 Bob
99284 14326 13742 32087 9604 78559 42621 66244 36246 14965 59658 74300 39412 93652 61484 14345 73 83840 37743 87450 43005 74136 11079 16547 39574 63960 90866 63359 11477 49852 90188 66492 41372 77379 43808 16328 91219 25595 14558 95418 31752 20673 2109 94875 54945 10840 57200 24495 1927...

output:

Bob

result:

ok single line: 'Bob'

Test #19:

score: 0
Accepted
time: 5ms
memory: 3820kb

input:

1
100000 Bob
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99...

output:

Bob

result:

ok single line: 'Bob'

Extra Test:

score: 0
Extra Test Passed