結果
問題 |
No.1569 Nixoracci's Number
|
ユーザー |
|
提出日時 | 2021-06-27 13:40:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 562 bytes |
コンパイル時間 | 484 ms |
コンパイル使用メモリ | 66,676 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 11:28:34 |
合計ジャッジ時間 | 2,879 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | WA * 8 RE * 13 |
ソースコード
#include<iostream> #include<algorithm> #include<cstring> using namespace std; typedef long long LL; const int N = 1e5+10; LL a[N],b[N],len=0; bool check(){ for(int i=1;i<=len/2;i++){ int j=i+len/2; if(a[i]!=a[j])return 0; } return 1; } int main(){ int n,m; LL res=0; scanf("%d%d",&n,&m); for(int i=1;i<=n;i++){ scanf("%lld",&a[i]); res^=a[i]; } int flag=0; for(int i=n+1;i<=5*n;i++){ a[i]=res; res^=a[i-n]; res^=a[i]; b[++len]=res; } if(m<=n+1){ printf("%d\n",a[m]); return 0; } m-=n; b[0]=b[n]; cout<<b[m%n]; return 0; }