QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#864253#9679. 盒子L_Hospital_#0 365ms120972kbC++14596b2025-01-20 12:55:142025-01-20 12:55:15

Judging History

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

  • [2025-01-20 12:55:15]
  • 评测
  • 测评结果:0
  • 用时:365ms
  • 内存:120972kb
  • [2025-01-20 12:55:14]
  • 提交

answer

#include<bits/stdc++.h>
# define int long long
# define rep(i, j, k) for (signed i = j; i <= k; ++i)
# define N 5000100
# define mod 998244353
using namespace std;

int l, r, B, dp[N + 5], tmp[N + 5], ans[N + 5];
signed main()
{
	ios::sync_with_stdio(false); cin.tie(0), cout.tie(0);
	cin >> l >> r >> B;
	dp[1] = ans[1] = 1;
	while (B--)
	{
		rep(i, 1, N) tmp[i] = dp[i - 1] + dp[i + 1];
		rep(i, 1, (N >> 1)) {const int x = N / i; rep(j, 2, x) tmp[i * j] += dp[i];}
		rep(i, 1, N) ans[i] += (dp[i] = tmp[i] % mod);
	}
	rep(i, l, r) cout << ans[i] % mod << ' ';
	return 0;
}

详细

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 365ms
memory: 120972kb

input:

3
5 2 4 3
2 2 1 2 2
4 2 4 3
2 4 1 1
10 3 5 1
2 2 2 2 1 1 1 10 2 2

output:

4 5 3 

result:

wrong answer 1st numbers differ - expected: '7', found: '4'

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Skipped

Dependency #2:

0%

Subtask #4:

score: 0
Wrong Answer

Test #35:

score: 0
Wrong Answer
time: 363ms
memory: 120808kb

input:

66664
7 2 82188055 1
35930054 4923258 36288509 46890418 53350617 49812938 68015568
10 2 460335201 1
305598063 240803174 36008172 416771728 391050572 270293987 333994588 436573185 216917970 103343453
9 3 119910901 1
35106715 29444257 72409421 49339248 23617992 3266647 38704192 75874356 72979434
10 1 ...

output:


result:

wrong answer Answer contains longer sequence [length = 66664], but output contains 0 elements

Subtask #5:

score: 0
Skipped

Dependency #1:

0%