QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#438704 | #8784. Dwarfs' Bedtime | Tobo | AC ✓ | 20ms | 8144kb | C++20 | 13.2kb | 2024-06-10 23:34:47 | 2024-06-10 23:34:48 |
Judging History
answer
#include <bits/stdc++.h>
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2")
// #pragma GCC optimize(3, "inline")
// #include <ext/pb_ds/tree_policy.hpp>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
// tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> s;
using i64 = long long;
using u32 = unsigned int;
using u64 = unsigned long long;
using i128 = __int128_t;
using namespace std;
const int N = 2e5 + 5;
// const int B = 3e6;
// const int M = 2e6 + 5;
// const int base = 16;
const i64 base = 13131;
// const int mod = 998244353;
// const int mod = 1e9 + 7;
const i64 mod = 1000000000000000003LL;
// const double pi = acos(-1);
mt19937_64 rnd(chrono::duration_cast<chrono::nanoseconds>(chrono::system_clock::now().time_since_epoch()).count());
template <int mod>
unsigned int down(unsigned int x)
{
return x >= mod ? x - mod : x;
}
template <int mod>
struct Modint
{
unsigned int x;
Modint() = default;
Modint(unsigned int x) : x(x) {}
friend istream &operator>>(istream &in, Modint &a) { return in >> a.x; }
friend ostream &operator<<(ostream &out, Modint a) { return out << a.x; }
friend Modint operator+(Modint a, Modint b) { return down<mod>(a.x + b.x); }
friend Modint operator-(Modint a, Modint b) { return down<mod>(a.x - b.x + mod); }
friend Modint operator*(Modint a, Modint b) { return 1ULL * a.x * b.x % mod; }
friend Modint operator/(Modint a, Modint b) { return a * ~b; }
friend Modint operator^(Modint a, int b)
{
Modint ans = 1;
for (; b; b >>= 1, a *= a)
if (b & 1)
ans *= a;
return ans;
}
friend Modint operator~(Modint a) { return a ^ (mod - 2); }
friend Modint operator-(Modint a) { return down<mod>(mod - a.x); }
friend Modint &operator+=(Modint &a, Modint b) { return a = a + b; }
friend Modint &operator-=(Modint &a, Modint b) { return a = a - b; }
friend Modint &operator*=(Modint &a, Modint b) { return a = a * b; }
friend Modint &operator/=(Modint &a, Modint b) { return a = a / b; }
friend Modint &operator^=(Modint &a, int b) { return a = a ^ b; }
friend Modint &operator++(Modint &a) { return a += 1; }
friend Modint operator++(Modint &a, int)
{
Modint x = a;
a += 1;
return x;
}
friend Modint &operator--(Modint &a) { return a -= 1; }
friend Modint operator--(Modint &a, int)
{
Modint x = a;
a -= 1;
return x;
}
friend bool operator==(Modint a, Modint b) { return a.x == b.x; }
friend bool operator!=(Modint a, Modint b) { return !(a == b); }
};
typedef Modint<998244353> mint;
// typedef Modint<1000000007> mint;
template <typename T>
struct Fenwick
{
int n;
vector<T> a;
Fenwick(int n = 0) { init(n); }
void init(int n)
{
this->n = n;
a.assign(n + 1, T());
}
void add(int x, T v)
{
for (int i = x; i <= n; i += i & -i)
a[i] += v;
}
T sum(int x)
{
auto ans = T();
for (int i = x; i; i -= i & -i)
ans += a[i];
return ans;
}
T rangeSum(int l, int r) { return sum(r) - sum(l - 1); }
int kth(T k)
{
int x = 0;
for (int i = 1 << std::__lg(n); i; i >>= 1)
{
if (x + i <= n && k >= a[x + i])
{
x += i;
k -= a[x];
}
}
return x;
}
};
const int P = 998244353;
using i64 = long long;
using Poly = vector<int>;
/*---------------------------------------------------------------------------*/
#define MUL(a, b) (i64(a) * (b) % P)
#define ADD(a, b) (((a) += (b)) >= P ? (a) -= P : 0) // (a += b) %= P
#define SUB(a, b) (((a) -= (b)) < 0 ? (a) += P : 0) // ((a -= b) += P) %= P
Poly getInv(int L)
{
Poly inv(L);
inv[1] = 1;
for (int i = 2; i < L; i++)
inv[i] = MUL((P - P / i), inv[P % i]);
return inv;
}
int POW(i64 a, int b = P - 2, i64 x = 1)
{
for (; b; b >>= 1, a = a * a % P)
if (b & 1)
x = x * a % P;
return x;
}
auto inv = getInv(N);
namespace NTT
{
const int g = 3;
Poly Omega(int L)
{
int wn = POW(g, P / L);
Poly w(L);
w[L >> 1] = 1;
for (int i = L / 2 + 1; i < L; i++)
w[i] = MUL(w[i - 1], wn);
for (int i = L / 2 - 1; i >= 1; i--)
w[i] = w[i << 1];
return w;
}
auto W = Omega(1 << 20); // Length
void DIF(int *a, int n)
{
for (int k = n >> 1; k; k >>= 1)
for (int i = 0, y; i < n; i += k << 1)
for (int j = 0; j < k; ++j)
y = a[i + j + k], a[i + j + k] = MUL(a[i + j] - y + P, W[k + j]), ADD(a[i + j], y);
}
void IDIT(int *a, int n)
{
for (int k = 1; k < n; k <<= 1)
for (int i = 0, x, y; i < n; i += k << 1)
for (int j = 0; j < k; ++j)
x = a[i + j], y = MUL(a[i + j + k], W[k + j]),
a[i + j + k] = x - y < 0 ? x - y + P : x - y, ADD(a[i + j], y);
int Inv = P - (P - 1) / n;
for (int i = 0; i < n; i++)
a[i] = MUL(a[i], Inv);
reverse(a + 1, a + n);
}
}
/*---------------------------------------------------------------------------*/
namespace Polynomial
{
// basic operator
int norm(int n) { return 1 << (__lg(n - 1) + 1); }
void norm(Poly &a)
{
if (!a.empty())
a.resize(norm(a.size()), 0);
else
a = {0};
}
void DFT(Poly &a) { NTT::DIF(a.data(), a.size()); }
void IDFT(Poly &a) { NTT::IDIT(a.data(), a.size()); }
Poly &dot(Poly &a, Poly &b)
{
for (int i = 0; i < a.size(); i++)
a[i] = MUL(a[i], b[i]);
return a;
}
// mul / div int
Poly &operator*=(Poly &a, int b)
{
for (auto &x : a)
x = MUL(x, b);
return a;
}
Poly operator*(Poly a, int b) { return a *= b; }
Poly operator*(int a, Poly b) { return b * a; }
Poly &operator/=(Poly &a, int b) { return a *= POW(b); }
Poly operator/(Poly a, int b) { return a /= b; }
// Poly add / sub
Poly &operator+=(Poly &a, Poly b)
{
a.resize(max(a.size(), b.size()));
for (int i = 0; i < b.size(); i++)
ADD(a[i], b[i]);
return a;
}
Poly operator+(Poly a, Poly b) { return a += b; }
Poly &operator-=(Poly &a, Poly b)
{
a.resize(max(a.size(), b.size()));
for (int i = 0; i < b.size(); i++)
SUB(a[i], b[i]);
return a;
}
Poly operator-(Poly a, Poly b) { return a -= b; }
// Poly mul
Poly operator*(Poly a, Poly b)
{
int n = a.size() + b.size() - 1, L = norm(n);
if (a.size() <= 8 || b.size() <= 8)
{
Poly c(n);
for (int i = 0; i < a.size(); i++)
for (int j = 0; j < b.size(); j++)
c[i + j] = (c[i + j] + (i64)a[i] * b[j]) % P;
return c;
}
a.resize(L), b.resize(L);
DFT(a), DFT(b), dot(a, b), IDFT(a);
return a.resize(n), a;
}
// Poly inv
Poly Inv2k(Poly a)
{ // |a| = 2 ^ k
int n = a.size(), m = n >> 1;
if (n == 1)
return {POW(a[0])};
Poly b = Inv2k(Poly(a.begin(), a.begin() + m)), c = b;
b.resize(n), DFT(a), DFT(b), dot(a, b), IDFT(a);
for (int i = 0; i < n; i++)
a[i] = i < m ? 0 : P - a[i];
DFT(a), dot(a, b), IDFT(a);
return move(c.begin(), c.end(), a.begin()), a;
}
Poly Inv(Poly a)
{
int n = a.size();
norm(a), a = Inv2k(a);
return a.resize(n), a;
}
// Poly calculus
Poly deriv(Poly a)
{
for (int i = 1; i < a.size(); i++)
a[i - 1] = MUL(i, a[i]);
return a.pop_back(), a;
}
Poly integ(Poly a)
{
a.push_back(0);
for (int i = a.size() - 1; i >= 1; i--)
a[i] = MUL(inv[i], a[i - 1]);
return a[0] = 0, a;
}
// Poly ln
Poly Ln(Poly a)
{
int n = a.size();
a = deriv(a) * Inv(a);
return a.resize(n - 1), integ(a);
}
// Poly exp
Poly Exp(Poly a)
{
int n = a.size(), k = norm(n);
Poly b = {1}, c, d;
a.resize(k);
for (int L = 2; L <= k; L <<= 1)
{
d = b, b.resize(L), c = Ln(b), c.resize(L);
for (int i = 0; i < L; i++)
c[i] = a[i] - c[i] + (a[i] < c[i] ? P : 0);
ADD(c[0], 1), DFT(b), DFT(c), dot(b, c), IDFT(b);
move(d.begin(), d.end(), b.begin());
}
return b.resize(n), b;
}
// Poly pow
Poly Pow(Poly &a, int b) { return Exp(Ln(a) * b); } // a[0] = 1
Poly Pow(Poly a, int b1, int b2)
{ // b1 = b % P, b2 = b % phi(P) and b >= n iff a[0] > 0
/*
a0 > 1 : f^k(x) = (f(x) * inv(a0))^k * a0^k
a0 = 0 : 右移至第一个系数不为0的项,设为x^d,则f(x) / x^d,转化为问题一,然后乘上(x^d)^k
*/
int n = a.size(), d = 0, k, a0;
while (d < n && !a[d])
++d;
if ((i64)d * b1 >= n)
return Poly(n);
a.erase(a.begin(), a.begin() + d); // f(x) / x^d
a0 = a[0];
k = POW(a0), norm(a *= k); // f(x) * inv(a0)
a = Pow(a, b1) * POW(a0, b2);
a.resize(n), d *= b1;
for (int i = n - 1; i >= 0; i--)
a[i] = i >= d ? a[i - d] : 0; // 乘上(x^d)^k
return a;
}
Poly Pow(Poly a, string str)
{
const int Phi = P - 1;
i64 k = 0, ol = 0, t = 0;
for (int i = 0; i < str.size(); i++)
{
k = (k * 10 + str[i] - '0') % P, ol = (ol * 10 + str[i] - '0') % Phi;
if (t <= P)
t = (t * 10 + str[i] - '0');
}
if (k < P && t >= P)
k += P;
return Pow(a, k, ol);
}
pair<Poly, Poly> div(Poly f, Poly g)
{ // F(x) = G(x) * Q(x) + R(x)
int n = f.size() - 1, m = g.size() - 1;
if (n < m)
return pair<Poly, Poly>{Poly{0}, f};
Poly f_reverse = f, g_reverse = g;
reverse(f_reverse.begin(), f_reverse.end());
reverse(g_reverse.begin(), g_reverse.end());
g_reverse.resize(n - m + 1);
Poly q = f_reverse * Inv(g_reverse);
q.resize(n - m + 1);
reverse(q.begin(), q.end());
Poly r(m), tmp = g * q;
for (int i = 0; i < m; i++)
r[i] = (f[i] - tmp[i] + P) % P;
return pair<Poly, Poly>{q, r};
}
}
using namespace Polynomial;
string tim(int x)
{
int a = x / 60, b = x % 60;
string ret = to_string(a);
if (ret.length() == 1)
ret.insert(ret.begin(), '0');
ret += ":" + to_string(b);
if (ret.length() == 4)
ret.insert(ret.begin() + 3, '0');
return ret;
}
void solve()
{
int n;
cin >> n;
int t = 39;
vector<int> pre(n + 1, -1);
vector<array<int, 2>> interval(n + 1, {-1, -1});
// 0睡着 1睡醒
int cur = 0;
for (; cur < 720; cur += t)
{
vector<int> tmp;
for (int j = 1; j <= n; j++)
{
if (interval[j] != array<int, 2>{-1, -1})
continue;
cout << "at " << tim(cur) << " check " << j << endl;
static string res;
cin >> res;
int u = res == "asleep" ? 0 : 1;
if (pre[j] == -1)
pre[j] = u;
else
{
if (pre[j] != u)
interval[j] = {cur - t + 1 + 720, cur + 720};
}
}
t--;
}
for (int j = 1; j <= n; j++)
{
if (interval[j] != array<int, 2>{-1, -1})
continue;
interval[j] = {cur - t + 1 + 720, 1440};
}
vector<int> ans(n + 1, -1);
vector<pair<int, int>> tmp;
for (int i = 1; i <= n; i++)
{
auto [l, r] = interval[i];
for (int j = l; j < min(1440, r); j++)
tmp.push_back({j, i});
}
sort(tmp.begin(), tmp.end());
for (auto [_tim, id] : tmp)
{
if (ans[id] != -1)
continue;
cout << "at " << tim(_tim) << " check " << id << endl;
static string res;
cin >> res;
int u = res == "asleep" ? 0 : 1;
if (u == pre[id])
{
ans[id] = _tim;
if (u == 1)
ans[id] = (ans[id] + 720) % 1440;
}
}
for (int i = 1; i <= n; i++)
{
if (ans[i] != -1)
continue;
ans[i] = interval[i][1] % 1440;
if (pre[i] == 1)
ans[i] = (ans[i] + 720) % 1440;
}
cout << "answer" << endl;
for (int i = 1; i <= n; i++)
cout << tim(ans[i]) << endl;
}
signed main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t = 1;
// cin >> t;
cout << fixed << setprecision(15);
while (t--)
solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 3ms
memory: 7960kb
input:
2 asleep awake asleep awake asleep awake asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep awake asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep a...
output:
at 00:00 check 1 at 00:00 check 2 at 00:38 check 1 at 00:38 check 2 at 01:15 check 1 at 01:15 check 2 at 01:51 check 1 at 01:51 check 2 at 02:26 check 1 at 03:00 check 1 at 03:33 check 1 at 04:05 check 1 at 04:36 check 1 at 05:06 check 1 at 05:35 check 1 at 06:03 check 1 at 06:30 check 1 at 06:56 ch...
result:
ok n = 2, total = 62, max = 32
Test #2:
score: 0
Accepted
time: 5ms
memory: 8020kb
input:
1 asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep awake awake awake awake awake awake
output:
at 00:00 check 1 at 00:38 check 1 at 01:15 check 1 at 01:51 check 1 at 02:26 check 1 at 03:00 check 1 at 03:33 check 1 at 04:05 check 1 at 04:36 check 1 at 05:06 check 1 at 05:35 check 1 at 06:03 check 1 at 06:30 check 1 at 06:56 check 1 at 07:21 check 1 at 07:45 check 1 at 08:08 check 1 at 08:30 ch...
result:
ok n = 1, total = 38, max = 38
Test #3:
score: 0
Accepted
time: 6ms
memory: 7888kb
input:
3 awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake asleep awake awake a...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:38 check 1 at 00:38 check 2 at 00:38 check 3 at 01:15 check 1 at 01:15 check 2 at 01:15 check 3 at 01:51 check 1 at 01:51 check 2 at 01:51 check 3 at 02:26 check 1 at 02:26 check 2 at 02:26 check 3 at 03:00 check 1 at 03:00 check 2 at 03:00 ch...
result:
ok n = 3, total = 114, max = 38
Test #4:
score: 0
Accepted
time: 5ms
memory: 7996kb
input:
24 asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep awake awake awake awake awake awake awake awake awake awake awake awake asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep awake awake awake awake awake awake awake awake awake awake awak...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 24, total = 748, max = 39
Test #5:
score: 0
Accepted
time: 9ms
memory: 8024kb
input:
24 awake asleep asleep asleep awake asleep asleep awake asleep awake awake awake asleep asleep awake awake awake asleep asleep asleep awake awake asleep awake awake asleep asleep asleep awake asleep asleep awake asleep awake awake awake asleep asleep awake awake awake asleep asleep asleep awake awak...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 24, total = 728, max = 39
Test #6:
score: 0
Accepted
time: 9ms
memory: 7960kb
input:
100 asleep awake awake asleep asleep awake asleep asleep asleep asleep asleep awake awake awake asleep awake asleep asleep asleep asleep awake asleep awake asleep asleep awake asleep awake asleep awake asleep asleep asleep awake awake asleep asleep asleep awake awake awake asleep awake awake awake a...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2753, max = 39
Test #7:
score: 0
Accepted
time: 5ms
memory: 8144kb
input:
100 asleep asleep asleep awake awake asleep awake asleep awake asleep asleep asleep awake asleep asleep awake awake asleep awake asleep asleep awake awake asleep asleep awake awake awake asleep awake asleep awake asleep asleep awake awake awake asleep awake awake awake asleep awake awake awake awake...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2653, max = 39
Test #8:
score: 0
Accepted
time: 9ms
memory: 7844kb
input:
100 awake awake awake asleep asleep awake awake asleep asleep awake awake asleep awake asleep asleep awake asleep asleep asleep asleep awake asleep asleep asleep asleep awake asleep asleep asleep asleep asleep asleep asleep awake asleep awake awake asleep awake asleep awake awake awake asleep awake ...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2760, max = 39
Test #9:
score: 0
Accepted
time: 7ms
memory: 8060kb
input:
100 awake awake asleep awake asleep awake asleep awake asleep awake awake asleep awake awake asleep awake asleep awake awake awake awake asleep awake awake awake awake awake asleep asleep asleep awake asleep asleep awake asleep awake asleep asleep awake asleep awake awake asleep awake awake awake as...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2671, max = 39
Test #10:
score: 0
Accepted
time: 11ms
memory: 8016kb
input:
100 awake awake awake awake awake asleep awake awake asleep asleep awake awake awake asleep awake awake awake asleep asleep awake asleep asleep asleep awake awake awake asleep asleep awake asleep asleep asleep awake awake asleep awake asleep awake awake awake asleep awake asleep asleep asleep awake ...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2676, max = 39
Test #11:
score: 0
Accepted
time: 11ms
memory: 8000kb
input:
100 asleep awake awake awake asleep asleep awake awake awake awake awake asleep awake awake asleep asleep awake awake awake awake asleep asleep asleep awake asleep asleep asleep awake asleep asleep asleep asleep asleep asleep awake asleep asleep awake asleep awake asleep awake awake asleep awake asl...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2655, max = 39
Test #12:
score: 0
Accepted
time: 8ms
memory: 7956kb
input:
100 awake awake awake asleep asleep awake asleep awake asleep awake awake awake asleep asleep asleep awake awake awake asleep awake awake asleep awake awake awake awake asleep awake asleep awake asleep asleep awake awake asleep awake asleep asleep asleep awake asleep awake awake awake awake awake as...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2868, max = 39
Test #13:
score: 0
Accepted
time: 6ms
memory: 8056kb
input:
100 asleep awake awake awake asleep awake awake asleep asleep awake awake asleep awake awake awake awake asleep asleep asleep awake asleep awake awake awake asleep asleep awake asleep awake asleep asleep asleep awake asleep awake asleep asleep awake asleep awake awake asleep awake awake asleep aslee...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2774, max = 39
Test #14:
score: 0
Accepted
time: 9ms
memory: 7864kb
input:
100 awake asleep asleep asleep asleep asleep asleep asleep asleep awake asleep asleep asleep awake asleep asleep asleep asleep asleep asleep awake asleep asleep awake asleep awake awake asleep asleep awake awake awake asleep awake awake awake awake awake asleep asleep awake asleep awake asleep aslee...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2686, max = 39
Test #15:
score: 0
Accepted
time: 0ms
memory: 8016kb
input:
100 awake awake awake asleep awake asleep awake asleep asleep awake asleep awake awake asleep awake asleep awake awake asleep awake awake asleep asleep asleep asleep awake asleep awake asleep awake awake awake asleep asleep awake asleep asleep awake awake asleep awake awake awake awake awake awake a...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2604, max = 39
Test #16:
score: 0
Accepted
time: 7ms
memory: 7888kb
input:
100 awake asleep awake asleep awake awake awake awake awake asleep asleep awake asleep awake asleep awake awake asleep asleep asleep asleep awake awake awake asleep awake awake asleep asleep asleep awake asleep asleep asleep awake asleep asleep asleep awake awake awake awake asleep asleep asleep awa...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2804, max = 39
Test #17:
score: 0
Accepted
time: 8ms
memory: 8016kb
input:
100 asleep asleep asleep awake awake awake awake asleep awake asleep awake asleep asleep asleep awake asleep awake awake awake asleep asleep asleep asleep asleep awake asleep asleep asleep awake awake awake asleep asleep asleep asleep asleep awake awake awake awake asleep awake awake awake awake asl...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2556, max = 39
Test #18:
score: 0
Accepted
time: 12ms
memory: 8072kb
input:
100 awake asleep asleep awake awake asleep asleep asleep asleep asleep awake asleep awake asleep awake asleep asleep asleep awake awake asleep asleep asleep awake awake awake asleep asleep awake asleep asleep awake awake asleep asleep awake awake asleep asleep asleep awake asleep asleep awake asleep...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2651, max = 39
Test #19:
score: 0
Accepted
time: 10ms
memory: 8024kb
input:
100 asleep awake awake asleep awake awake awake asleep asleep asleep awake awake asleep awake asleep asleep awake asleep awake awake asleep awake asleep awake awake awake asleep asleep asleep awake awake asleep awake asleep asleep awake asleep awake awake awake asleep asleep asleep awake awake awake...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2625, max = 39
Test #20:
score: 0
Accepted
time: 3ms
memory: 8036kb
input:
100 awake awake awake asleep asleep awake asleep awake asleep awake awake awake asleep asleep asleep awake awake asleep awake awake asleep asleep awake asleep asleep asleep asleep awake asleep awake asleep asleep asleep asleep asleep awake asleep asleep asleep asleep asleep awake awake asleep awake ...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 100, total = 2726, max = 39
Test #21:
score: 0
Accepted
time: 5ms
memory: 7996kb
input:
98 asleep asleep awake asleep awake awake asleep awake awake awake awake awake asleep awake awake asleep awake asleep asleep awake awake awake awake asleep asleep awake asleep asleep asleep asleep awake awake asleep asleep awake awake asleep awake asleep awake asleep awake asleep asleep awake asleep...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 98, total = 2775, max = 39
Test #22:
score: 0
Accepted
time: 14ms
memory: 7996kb
input:
99 asleep asleep asleep awake awake awake awake awake asleep awake asleep asleep awake asleep asleep asleep asleep awake awake awake asleep asleep asleep asleep asleep asleep asleep awake asleep awake asleep awake asleep asleep asleep asleep asleep asleep awake asleep asleep asleep asleep awake awak...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 99, total = 2651, max = 39
Test #23:
score: 0
Accepted
time: 0ms
memory: 7960kb
input:
95 asleep awake awake awake asleep asleep asleep awake awake awake asleep awake asleep awake asleep asleep awake asleep awake asleep asleep awake awake asleep awake awake awake awake awake awake awake awake awake awake awake asleep awake asleep awake asleep asleep awake awake asleep awake asleep asl...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 95, total = 2590, max = 39
Test #24:
score: 0
Accepted
time: 3ms
memory: 7984kb
input:
93 awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awa...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 93, total = 2566, max = 39
Test #25:
score: 0
Accepted
time: 4ms
memory: 8028kb
input:
93 awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awa...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 93, total = 2441, max = 39
Test #26:
score: 0
Accepted
time: 20ms
memory: 8020kb
input:
97 awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awa...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 97, total = 2641, max = 39
Test #27:
score: 0
Accepted
time: 3ms
memory: 8020kb
input:
95 asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asl...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 95, total = 2701, max = 39
Test #28:
score: 0
Accepted
time: 4ms
memory: 7868kb
input:
97 asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asl...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 97, total = 2522, max = 39
Test #29:
score: 0
Accepted
time: 4ms
memory: 7924kb
input:
96 asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asl...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 96, total = 2573, max = 39
Test #30:
score: 0
Accepted
time: 10ms
memory: 7960kb
input:
92 awake awake awake awake awake awake asleep awake awake asleep awake awake awake asleep asleep awake asleep awake awake awake asleep awake asleep awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake asleep awake awake awake a...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 92, total = 2517, max = 39
Test #31:
score: 0
Accepted
time: 10ms
memory: 8032kb
input:
95 awake asleep asleep awake awake awake asleep awake awake awake asleep asleep asleep asleep asleep awake awake awake awake awake awake awake asleep awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake awake asleep awake awake...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 95, total = 2405, max = 39
Test #32:
score: 0
Accepted
time: 10ms
memory: 8012kb
input:
99 awake asleep awake awake awake awake asleep awake awake awake awake awake awake awake awake awake asleep awake awake awake awake awake awake asleep awake awake awake awake asleep awake asleep asleep asleep awake awake awake awake awake asleep awake awake asleep awake awake asleep awake asleep awa...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 99, total = 2611, max = 39
Test #33:
score: 0
Accepted
time: 3ms
memory: 8020kb
input:
96 asleep awake asleep asleep asleep asleep asleep asleep asleep asleep awake asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep awake asleep asleep awake awake asleep asleep asleep asleep asleep asleep awake asleep asleep asleep awake asleep awake asleep asleep asle...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 96, total = 2774, max = 39
Test #34:
score: 0
Accepted
time: 3ms
memory: 8004kb
input:
97 asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep awake asleep asleep asleep asleep asleep asleep asleep awake asleep asleep asleep asleep awake awake asleep asleep asleep awake asleep asleep asleep asleep awake awake asleep asleep asleep asleep awake asle...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 97, total = 2847, max = 39
Test #35:
score: 0
Accepted
time: 11ms
memory: 7964kb
input:
98 asleep asleep asleep asleep awake asleep awake asleep asleep awake asleep asleep asleep asleep asleep asleep asleep asleep asleep asleep awake asleep awake asleep asleep awake awake asleep asleep asleep asleep asleep asleep awake asleep asleep awake asleep awake asleep asleep asleep asleep asleep...
output:
at 00:00 check 1 at 00:00 check 2 at 00:00 check 3 at 00:00 check 4 at 00:00 check 5 at 00:00 check 6 at 00:00 check 7 at 00:00 check 8 at 00:00 check 9 at 00:00 check 10 at 00:00 check 11 at 00:00 check 12 at 00:00 check 13 at 00:00 check 14 at 00:00 check 15 at 00:00 check 16 at 00:00 check 17 at ...
result:
ok n = 98, total = 2873, max = 39
Extra Test:
score: 0
Extra Test Passed