QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#107329#6110. Squirrel Gamebulijiojiodibuliduo#WA 3ms5960kbC++1.0kb2023-05-20 23:43:352023-05-20 23:43:37

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-05-20 23:43:37]
  • 评测
  • 测评结果:WA
  • 用时:3ms
  • 内存:5960kb
  • [2023-05-20 23:43:35]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef basic_string<int> BI;
typedef long long ll;
typedef pair<int,int> PII;
typedef double db;
mt19937 mrand(random_device{}()); 
const ll mod=1000000007;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head

const int N=101000;
int n,m,k,x[N];
VI ps[N];
int main() {
	scanf("%d%d%d",&m,&n,&k);
	rep(i,1,n+1) scanf("%d",&x[i]);
	rep(i,1,n+1) {
		ps[i%k].pb(x[i]-x[i-1]-1);
	}
	ps[(n+1)%k].pb(0);
	int sg=0;
	rep(i,0,k) {
		reverse(all(ps[i]));
		for (int j=1;j<SZ(ps[i]);j+=2) sg^=ps[i][j];
	}
	puts(sg==0?"Nova":"Twinkle");
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 3ms
memory: 5960kb

input:

7 3 2
1 4 7

output:

Twinkle

result:

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