QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#687895#6110. Squirrel GameNephren_SakuraWA 1ms5724kbC++14492b2024-10-29 21:45:372024-10-29 21:45:37

Judging History

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

  • [2024-10-29 21:45:37]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:5724kb
  • [2024-10-29 21:45:37]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
int n,m,k,a[1000005],b[1000005];
signed main(){
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
	cin>>n>>m>>k;
	for(int i=1; i<=m; i++) cin>>a[i];
	int s=0;
	bool f=false;
	for(int i=1; i<=min(m,k); i++) s^=a[i]-a[i-1]-1,b[i]=a[i]-a[i-1]-1;
	f^=(s!=0);
	for(int i=k+1; i<=m; i++){
		s^=b[(i-1)%k+1],b[(i-1)%k+1]=a[i]-a[i-1]-1,s^=b[(i-1)%k+1],f^=(s!=0);
	}
	cout<<(f?"Nova\n":"Twinkle\n");
	return 0;
}

詳細信息

Test #1:

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

input:

7 3 2
1 4 7

output:

Nova

result:

ok single line: 'Nova'

Test #2:

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

input:

7 3 1
1 4 7

output:

Twinkle

result:

ok single line: 'Twinkle'

Test #3:

score: -100
Wrong Answer
time: 0ms
memory: 5724kb

input:

1 1 1
1

output:

Twinkle

result:

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