結果

問題 No.1569 Nixoracci's Number
ユーザー Live Youtube Channel Promotion Free
提出日時 2022-01-24 20:40:07
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 577 bytes
コンパイル時間 2,182 ms
コンパイル使用メモリ 194,648 KB
最終ジャッジ日時 2025-01-27 15:10:52
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define ll long long 
#define mod 1000000007
#define db1(x)  cerr <<#x<<"="<<x<<'\n'
#define db2(x,y)  cerr <<#x<<"="<<x<<" , "<<#y<<"="<<y<<'\n'
#define db3(x,y,z)  cerr <<#x<<"="<<x<<" , "<<#y<<"="<<y<<" , "<<#z<<"="<<z<<'\n'
int main()
{
 ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);


       ll n,k,v,ans=0;
    cin>>n>>k;
    vector<ll> a(n);
    for(int i=0;i<n;i++){
        cin>>a[i];
        ans^=a[i];
    }
    a.push_back(ans);
    cout<<a[(k-1)%(n+1)]<<endl;
       return 0;
}
0