QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#107329 | #6110. Squirrel Game | bulijiojiodibuliduo# | WA | 3ms | 5960kb | C++ | 1.0kb | 2023-05-20 23:43:35 | 2023-05-20 23:43:37 |
Judging History
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");
}
詳細信息
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'