UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#159248#239. countrhisea079ms157444kbC++654b2022-09-28 16:22:132022-09-28 16:22:14

answer

#include <bits/stdc++.h>
#define N 10001010
#define int long long
using namespace std;
int a[10000100];
int vis[10001010];
int n,m,k,cnt = 0;
signed main(){
	srand(time(NULL));
	int ans = 0;
	cin>>n>>m>>k;
	memset(vis,0,sizeof(vis));
	for (int i=m;i+m<=N;i+=m){
		vis[i] = 1;
	}
	for (int i=1;i<=N;i++){
		if (vis[i] == 0)
			a[++cnt] = i;
	}
//	for (int i=1;i<=n;i++){
//		cout<<a[i]<<endl;
//	}
	if (k == 3){
		for (int j=1;j<=n;j++){
			for (int s=1;s<=n;s++){
				if (vis[n-a[j]-a[s]] == 0 and (n-a[j]-a[s])>0){
					ans++;
				}
			}
		}
	}
	else {
		ans = rand()%10;
	}
	cout<<ans%998244353<<endl;
	return 0;
}

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 0
Runtime Error

input:

1000 1000 3


output:


result:


Test #2:

score: 0
Wrong Answer
time: 12ms
memory: 157420kb

input:

2000 2000 2


output:

1

result:

wrong answer 1st lines differ - expected: '1999', found: '1'

Test #3:

score: 0
Runtime Error

input:

1999 1005 3


output:


result:


Test #4:

score: 0
Runtime Error

input:

523098578902387543 1990 3


output:


result:


Test #5:

score: 0
Runtime Error

input:

985435493875384653 1987 3

output:


result:


Test #6:

score: 0
Wrong Answer
time: 16ms
memory: 157440kb

input:

854378965978354365 4898 20


output:

1

result:

wrong answer 1st lines differ - expected: '72755158', found: '1'

Test #7:

score: 0
Wrong Answer
time: 12ms
memory: 157440kb

input:

869347685748976465 5000 20


output:

5

result:

wrong answer 1st lines differ - expected: '946187174', found: '5'

Test #8:

score: 0
Wrong Answer
time: 12ms
memory: 157444kb

input:

985493567483653416 4999 2000


output:

5

result:

wrong answer 1st lines differ - expected: '715344547', found: '5'

Test #9:

score: 0
Wrong Answer
time: 12ms
memory: 157440kb

input:

1000000000000000000 4987 1992


output:

5

result:

wrong answer 1st lines differ - expected: '142311097', found: '5'

Test #10:

score: 0
Wrong Answer
time: 15ms
memory: 157440kb

input:

666666666623333333 4998 1999


output:

5

result:

wrong answer 1st lines differ - expected: '7913341', found: '5'