QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#492700#8784. Dwarfs' BedtimeZ_drjAC ✓14ms4064kbC++141.6kb2024-07-26 15:22:122024-07-26 15:22:13

Judging History

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

  • [2024-07-26 15:22:13]
  • 评测
  • 测评结果:AC
  • 用时:14ms
  • 内存:4064kb
  • [2024-07-26 15:22:12]
  • 提交

answer

#include <cstdio>
#include <queue>
#include <string>
#include <vector>
#include <algorithm>

using i64 = long long;

const int N = 105;

int n;
int ans[N], lst[N];
int sum[N];

std::vector<int> TurnTime(const int & minutes) {
	std::vector<int> t {minutes / 60, minutes % 60};
	return t;
}

bool query(std::vector<int> t, int id){
	printf("at ");
	printf("%02d:%02d", t[0], t[1]);
	printf(" check %d\n", id);
	std::fflush(stdout);

	char op[10];
	scanf("%s", op + 1);

	return op[2] == 'w';
}

struct Node {
	int id, Time;
	Node(int _id = 0, int _t = 0) : id(_id), Time(_t) {}
	bool operator < (const Node & x) const {
		return Time > x.Time;
	}
};

int main() {
	scanf("%d", &n);

	std::priority_queue<Node> q;
	for (int i = 1; i <= n; i++) {
		sum[i] = 47;
		lst[i] = -1;
		q.emplace(i, 0);
	}

	while (!q.empty()) {
		int id = q.top().id; 
		int t = q.top().Time;
		q.pop();

		if (lst[id] == -1) {
			lst[id] = query(TurnTime(0), id);
			ans[id] = 0;
			q.emplace(id, sum[id]);
		} else {
			if (ans[id] == 1440){
				ans[id] = 720 * lst[id];
				continue;
			}
			bool awake = query(TurnTime(t), id);
			if (sum[id] == 1) {
				if (lst[id] != awake) {
					ans[id]++;
					q.emplace(id, ans[id]);
				}
				else ans[id] -= 720 * lst[id];
			} else {
				if (lst[id] != awake) {
					ans[id] = (ans[id] + 721), sum[id] = 1;
					q.emplace(id, ans[id]);
				} else {
					ans[id] = t;
					q.emplace(id, t + sum[id]);
					sum[id]--;
				}
			}
		}
	}

	puts("answer");
	for (int i = 1; i <= n; i++) {
		std::vector<int> t = TurnTime(ans[i]);
		printf("%02d:%02d\n", t[0], t[1]);
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
asleep
awake
asleep
awake
asleep
awake
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
asleep
asleep
awake
awake
awake
awake
awake
awake
awake
awake
asleep

output:

at 00:00 check 1
at 00:00 check 2
at 00:47 check 1
at 00:47 check 2
at 01:34 check 1
at 01:34 check 2
at 02:20 check 1
at 02:20 check 2
at 03:05 check 1
at 03:49 check 1
at 04:32 check 1
at 05:14 check 1
at 05:55 check 1
at 06:35 check 1
at 07:14 check 1
at 07:52 check 1
at 08:29 check 1
at 13:35 ch...

result:

ok n = 2, total = 32, max = 21

Test #2:

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

input:

1
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
awake
awake
awake
awake

output:

at 00:00 check 1
at 00:47 check 1
at 01:34 check 1
at 02:20 check 1
at 03:05 check 1
at 03:49 check 1
at 04:32 check 1
at 05:14 check 1
at 05:55 check 1
at 06:35 check 1
at 07:14 check 1
at 07:52 check 1
at 08:29 check 1
at 09:05 check 1
at 09:40 check 1
at 10:14 check 1
at 10:47 check 1
at 11:19 ch...

result:

ok n = 1, total = 29, max = 29

Test #3:

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

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:47 check 1
at 00:47 check 2
at 00:47 check 3
at 01:34 check 1
at 01:34 check 2
at 01:34 check 3
at 02:20 check 1
at 02:20 check 2
at 02:20 check 3
at 03:05 check 1
at 03:05 check 2
at 03:05 check 3
at 03:49 check 1
at 03:49 check 2
at 03:49 ch...

result:

ok n = 3, total = 87, max = 29

Test #4:

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

input:

24
asleep
asleep
asleep
awake
asleep
awake
asleep
awake
awake
asleep
asleep
asleep
awake
awake
asleep
awake
awake
asleep
asleep
awake
awake
asleep
awake
awake
asleep
asleep
asleep
awake
awake
asleep
awake
awake
asleep
awake
asleep
awake
asleep
awake
asleep
awake
asleep
asleep
awake
awake
awake
aslee...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 24
at 00:00 check 14
at 00:00 check 6
at 00:00 check 13
at 00:00 check 12
at 00:00 check 2
at 00:00 check 5
at 00:00 check 11
at 00:00 check 23
at 00:00 check 22
at 00:00 check 10
at 00:00 check 21
at 00:00 check 20
...

result:

ok n = 24, total = 716, max = 45

Test #5:

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

input:

24
awake
asleep
asleep
awake
awake
asleep
asleep
asleep
awake
asleep
awake
awake
asleep
awake
awake
awake
asleep
asleep
asleep
asleep
asleep
awake
awake
awake
awake
asleep
asleep
awake
awake
asleep
awake
asleep
awake
asleep
asleep
awake
awake
awake
awake
asleep
awake
awake
asleep
asleep
awake
asleep...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 24
at 00:00 check 14
at 00:00 check 6
at 00:00 check 13
at 00:00 check 12
at 00:00 check 2
at 00:00 check 5
at 00:00 check 11
at 00:00 check 23
at 00:00 check 22
at 00:00 check 10
at 00:00 check 21
at 00:00 check 20
...

result:

ok n = 24, total = 694, max = 44

Test #6:

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

input:

100
asleep
awake
asleep
asleep
asleep
awake
awake
asleep
awake
awake
asleep
awake
asleep
awake
awake
awake
asleep
asleep
awake
awake
asleep
awake
asleep
awake
awake
awake
awake
asleep
awake
awake
asleep
awake
asleep
asleep
asleep
asleep
awake
awake
asleep
asleep
awake
awake
awake
asleep
asleep
awake...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 3156, max = 50

Test #7:

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

input:

100
asleep
asleep
awake
asleep
asleep
asleep
asleep
awake
awake
awake
awake
asleep
asleep
asleep
awake
awake
awake
asleep
asleep
awake
awake
awake
asleep
awake
awake
awake
asleep
asleep
awake
awake
asleep
asleep
awake
awake
awake
awake
awake
asleep
awake
asleep
awake
awake
awake
awake
awake
awake
as...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 2875, max = 50

Test #8:

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

input:

100
awake
awake
awake
asleep
asleep
asleep
awake
awake
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
awake
awake
asleep
asleep
awake
awake
asleep
awake
asleep
asleep
awake
asleep
asleep
asleep
awake
awake
asleep
asleep
awake
awake
asleep
awake
asleep
asleep
asleep
asleep
aslee...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 3108, max = 50

Test #9:

score: 0
Accepted
time: 14ms
memory: 3856kb

input:

100
awake
asleep
asleep
asleep
awake
awake
awake
asleep
asleep
asleep
asleep
awake
asleep
awake
asleep
asleep
awake
asleep
awake
awake
awake
awake
asleep
awake
asleep
awake
asleep
awake
awake
asleep
awake
asleep
asleep
asleep
awake
awake
awake
awake
asleep
awake
awake
asleep
awake
awake
awake
awake
...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 3117, max = 50

Test #10:

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

input:

100
awake
awake
awake
awake
asleep
asleep
awake
asleep
asleep
awake
asleep
asleep
awake
awake
asleep
asleep
awake
awake
asleep
awake
asleep
asleep
awake
awake
awake
awake
awake
awake
asleep
asleep
awake
awake
asleep
asleep
asleep
awake
asleep
awake
awake
awake
asleep
asleep
asleep
awake
awake
awake
...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 2760, max = 49

Test #11:

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

input:

100
asleep
awake
awake
asleep
asleep
asleep
awake
awake
asleep
awake
asleep
awake
asleep
awake
awake
awake
asleep
awake
asleep
awake
asleep
awake
awake
asleep
awake
awake
asleep
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
awake
asleep
asleep
awake
asleep
asleep
...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 2770, max = 50

Test #12:

score: 0
Accepted
time: 6ms
memory: 3860kb

input:

100
awake
awake
asleep
asleep
asleep
awake
awake
awake
awake
asleep
awake
asleep
asleep
asleep
asleep
awake
asleep
asleep
awake
asleep
asleep
awake
awake
awake
awake
awake
awake
awake
asleep
awake
awake
awake
asleep
awake
asleep
asleep
asleep
awake
asleep
awake
awake
asleep
awake
awake
awake
asleep
...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 3140, max = 50

Test #13:

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

input:

100
asleep
awake
awake
awake
asleep
asleep
awake
asleep
asleep
asleep
asleep
awake
awake
asleep
asleep
asleep
awake
asleep
awake
awake
awake
asleep
awake
asleep
asleep
awake
asleep
asleep
asleep
asleep
awake
asleep
asleep
awake
asleep
awake
awake
awake
asleep
awake
awake
asleep
awake
awake
asleep
aw...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 3090, max = 50

Test #14:

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

input:

100
awake
asleep
asleep
asleep
awake
awake
asleep
awake
awake
asleep
awake
awake
asleep
asleep
asleep
asleep
asleep
awake
asleep
asleep
awake
awake
awake
awake
awake
asleep
asleep
asleep
awake
awake
awake
awake
awake
asleep
awake
asleep
awake
asleep
asleep
asleep
asleep
awake
awake
awake
awake
aslee...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 2994, max = 49

Test #15:

score: 0
Accepted
time: 6ms
memory: 3856kb

input:

100
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
asleep
asleep
awake
awake
awake
awake
awake
asleep
awake
asleep
awake
awake
awake
asleep
awake
awake
asleep
awake
awake
asleep
awake
asleep
awake
awake
asleep
asleep
awake
awake
asleep
asleep
awake
awake
asleep
awake
awake
asleep
...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 2653, max = 50

Test #16:

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

input:

100
awake
awake
awake
asleep
awake
awake
asleep
awake
asleep
awake
awake
awake
asleep
awake
asleep
asleep
asleep
awake
awake
asleep
awake
asleep
asleep
awake
asleep
asleep
awake
asleep
asleep
asleep
awake
awake
asleep
asleep
asleep
awake
awake
asleep
awake
asleep
awake
asleep
awake
asleep
awake
asle...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 2964, max = 50

Test #17:

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

input:

100
asleep
asleep
awake
awake
awake
awake
awake
awake
awake
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
asleep
awake
asleep
asleep
awake
awake
asleep
awake
asleep
asleep
awake
asleep
asleep
asleep
asleep
awake
asleep
awake
awake
awake
asleep
awake
awake
asleep
asleep
asleep
awake
asleep
a...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 3174, max = 50

Test #18:

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

input:

100
awake
asleep
asleep
awake
asleep
awake
asleep
asleep
asleep
awake
asleep
asleep
awake
asleep
awake
asleep
asleep
asleep
asleep
awake
asleep
awake
awake
awake
awake
asleep
asleep
awake
asleep
awake
awake
asleep
awake
asleep
asleep
asleep
awake
asleep
awake
awake
asleep
asleep
asleep
asleep
awake
...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 3033, max = 50

Test #19:

score: 0
Accepted
time: 9ms
memory: 3720kb

input:

100
asleep
awake
awake
asleep
awake
awake
awake
awake
awake
asleep
asleep
awake
asleep
awake
asleep
asleep
awake
awake
awake
asleep
asleep
awake
awake
awake
asleep
asleep
awake
awake
asleep
awake
awake
awake
awake
awake
awake
asleep
asleep
awake
awake
awake
asleep
asleep
awake
awake
awake
awake
awak...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 2919, max = 49

Test #20:

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

input:

100
awake
awake
asleep
asleep
asleep
asleep
awake
awake
awake
awake
awake
asleep
asleep
awake
asleep
awake
asleep
asleep
awake
asleep
asleep
asleep
asleep
asleep
awake
asleep
awake
asleep
awake
awake
asleep
awake
awake
awake
awake
awake
asleep
awake
asleep
awake
awake
awake
awake
awake
asleep
awake
...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 100
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check...

result:

ok n = 100, total = 3262, max = 50

Test #21:

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

input:

98
asleep
awake
asleep
awake
awake
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
awake
asleep
asleep
awake
awake
awake
asleep
asleep
asleep
asleep
awake
asleep
asleep
awake
asleep
awake
asleep
asleep
asleep
asleep
awake
awake
asleep
awake
awake
awake
asleep
awake
asleep
asleep
awake
awake
a...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 98
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 98, total = 2709, max = 50

Test #22:

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

input:

99
asleep
asleep
awake
asleep
asleep
awake
awake
asleep
awake
awake
awake
asleep
asleep
awake
asleep
awake
asleep
asleep
awake
awake
asleep
awake
awake
asleep
awake
asleep
asleep
asleep
asleep
awake
asleep
asleep
awake
awake
awake
asleep
asleep
awake
asleep
asleep
awake
awake
awake
awake
asleep
awak...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 99
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 99, total = 2839, max = 50

Test #23:

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

input:

95
asleep
awake
asleep
asleep
awake
awake
asleep
awake
awake
asleep
asleep
awake
awake
asleep
awake
awake
awake
awake
asleep
asleep
awake
asleep
asleep
awake
asleep
asleep
awake
awake
awake
awake
asleep
awake
awake
awake
asleep
asleep
awake
asleep
asleep
asleep
asleep
asleep
awake
awake
asleep
awake...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 95
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 95, total = 2951, max = 50

Test #24:

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

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 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 93
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 93, total = 2982, max = 50

Test #25:

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

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 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 93
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 93, total = 2968, max = 50

Test #26:

score: 0
Accepted
time: 8ms
memory: 3792kb

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 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 97
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 97, total = 2595, max = 50

Test #27:

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

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 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 95
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 95, total = 2891, max = 50

Test #28:

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

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 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 97
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 97, total = 2920, max = 50

Test #29:

score: 0
Accepted
time: 6ms
memory: 3784kb

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 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 96
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 96, total = 3099, max = 50

Test #30:

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

input:

92
awake
awake
asleep
asleep
awake
awake
asleep
awake
awake
awake
awake
asleep
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
awake
asleep
awake
awake
awake
awake
asleep
awake
awake
awake
asleep
awake
awake
awake
awake
awake
asleep
asleep
...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 92
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 92, total = 2806, max = 50

Test #31:

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

input:

95
awake
asleep
asleep
asleep
awake
awake
awake
awake
awake
awake
awake
asleep
awake
awake
awake
awake
awake
asleep
awake
asleep
awake
awake
awake
awake
awake
awake
asleep
awake
awake
awake
awake
asleep
awake
asleep
awake
asleep
asleep
awake
asleep
asleep
asleep
awake
awake
awake
awake
awake
awake
a...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 95
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 95, total = 2593, max = 50

Test #32:

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

input:

99
awake
awake
asleep
awake
asleep
asleep
awake
awake
awake
asleep
asleep
awake
asleep
awake
awake
awake
awake
awake
awake
awake
awake
asleep
awake
awake
awake
awake
awake
awake
awake
awake
asleep
awake
awake
awake
awake
awake
asleep
awake
awake
awake
asleep
awake
awake
awake
asleep
awake
awake
asle...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 99
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 99, total = 2833, max = 50

Test #33:

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

input:

96
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
asleep
awake
asleep
awake
asleep
asleep
asleep
asleep
asleep
awake
asleep
asl...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 96
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 96, total = 3326, max = 50

Test #34:

score: 0
Accepted
time: 7ms
memory: 4024kb

input:

97
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
asleep
asleep
awake
asleep
awake
asleep
asleep
awake
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
as...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 97
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 97, total = 3006, max = 50

Test #35:

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

input:

98
asleep
asleep
awake
asleep
asleep
awake
asleep
asleep
asleep
awake
asleep
asleep
asleep
asleep
awake
asleep
asleep
awake
asleep
asleep
awake
awake
asleep
awake
asleep
asleep
asleep
asleep
asleep
asleep
asleep
asleep
awake
awake
asleep
asleep
awake
asleep
awake
awake
asleep
awake
asleep
asleep
asl...

output:

at 00:00 check 1
at 00:00 check 3
at 00:00 check 7
at 00:00 check 15
at 00:00 check 31
at 00:00 check 63
at 00:00 check 98
at 00:00 check 62
at 00:00 check 30
at 00:00 check 61
at 00:00 check 60
at 00:00 check 14
at 00:00 check 29
at 00:00 check 59
at 00:00 check 58
at 00:00 check 28
at 00:00 check ...

result:

ok n = 98, total = 3134, max = 50

Extra Test:

score: 0
Extra Test Passed