結果

問題 No.1569 Nixoracci's Number
ユーザー Nzt3
提出日時 2022-10-13 16:39:12
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 1,921 ms
コンパイル使用メモリ 195,376 KB
最終ジャッジ日時 2025-02-08 02:43:00
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
const int mod=1e9+7;
int main(){
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  long long N,K;
  cin>>N>>K;
  vector<long long>A(N);
  for(auto &i:A)cin>>i;
  A.push_back(0);
  for(int i=0;i<N;i++){
    A[N]^=A[i];
  }
  cout<<A[(K-1)%(N+1)]<<'\n';
}
0