QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#836514#6110. Squirrel Gamegyydp123_LIMWA 0ms3700kbC++14947b2024-12-28 22:33:152024-12-28 22:33:16

Judging History

This is the latest submission verdict.

  • [2024-12-28 22:33:16]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3700kb
  • [2024-12-28 22:33:15]
  • Submitted

answer

#include<bits/stdc++.h>
#define For(i,j,k) for(int i=(j);i<=(k);++i)
#define ForDown(i,j,k) for(int i=(j);i>=(k);--i)
#define Debug(fmt, args...) fprintf(stderr,"(func %s, line #%d): " fmt,__func__,__LINE__,##args),fflush(stderr)
#define debug(fmt, args...) fprintf(stderr,fmt,##args),fflush(stderr)
#define within :
#define LJY main
using namespace std;
typedef long long ll;
const int N=1e5+5;
inline int read(){
  char ch=getchar();int x=0,f=1;
  while(ch<'0'||ch>'9'){if(ch=='-') f=-1;ch=getchar();}
  while(ch>='0'&&ch<='9')
    x=(x<<3)+(x<<1)+(ch^48),ch=getchar();
  return x*f;
}
int m,n,k,x[N];
signed LJY(){
  m=read();n=read();k=read();
  For(i,1,n) x[i]=read();
  int ans=0;
  For(i,1,k){
    static vector<int>val;val.clear();
    for(int j=i;j<=n;j++)
      val.emplace_back(x[j]-x[j-1]-1);
    int len=val.size();
    for(int i=len-1;i>=0;i-=2) ans^=val[i];
  }puts(ans?"Twinkle":"Nova");
  return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3692kb

input:

7 3 2
1 4 7

output:

Nova

result:

ok single line: 'Nova'

Test #2:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

7 3 1
1 4 7

output:

Twinkle

result:

ok single line: 'Twinkle'

Test #3:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

1 1 1
1

output:

Nova

result:

ok single line: 'Nova'

Test #4:

score: 0
Accepted
time: 0ms
memory: 3624kb

input:

1 1 10
1

output:

Nova

result:

ok single line: 'Nova'

Test #5:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

100000 1 1
19593

output:

Twinkle

result:

ok single line: 'Twinkle'

Test #6:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

100000 1 10
62516

output:

Twinkle

result:

ok single line: 'Twinkle'

Test #7:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

100 10 1
23 24 43 47 62 66 68 73 82 85

output:

Twinkle

result:

ok single line: 'Twinkle'

Test #8:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

100 10 3
11 18 23 26 30 40 52 76 78 99

output:

Twinkle

result:

ok single line: 'Twinkle'

Test #9:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

100 10 7
14 27 51 62 66 71 75 79 80 97

output:

Twinkle

result:

ok single line: 'Twinkle'

Test #10:

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

input:

100 10 10
10 18 25 50 51 54 64 77 95 96

output:

Nova

result:

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