結果

問題 No.1569 Nixoracci's Number
ユーザー mortalmortal
提出日時 2021-08-02 19:20:19
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,359 bytes
コンパイル時間 3,459 ms
コンパイル使用メモリ 165,460 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-10-14 20:51:52
合計ジャッジ時間 3,588 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,368 KB
testcase_01 AC 2 ms
4,368 KB
testcase_02 AC 2 ms
4,368 KB
testcase_03 AC 1 ms
4,372 KB
testcase_04 AC 2 ms
4,368 KB
testcase_05 AC 2 ms
4,368 KB
testcase_06 AC 2 ms
4,372 KB
testcase_07 AC 1 ms
4,368 KB
testcase_08 AC 2 ms
4,368 KB
testcase_09 AC 2 ms
4,368 KB
testcase_10 AC 2 ms
4,368 KB
testcase_11 AC 2 ms
4,372 KB
testcase_12 AC 2 ms
4,368 KB
testcase_13 AC 1 ms
4,368 KB
testcase_14 AC 2 ms
4,372 KB
testcase_15 AC 1 ms
4,368 KB
testcase_16 AC 1 ms
4,368 KB
testcase_17 AC 2 ms
4,372 KB
testcase_18 AC 1 ms
4,372 KB
testcase_19 AC 1 ms
4,368 KB
testcase_20 AC 2 ms
4,368 KB
testcase_21 AC 2 ms
4,372 KB
testcase_22 AC 1 ms
4,368 KB
testcase_23 AC 2 ms
4,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
//#include <ext/pb_ds/assoc_container.hpp> 
//#include <ext/pb_ds/tree_policy.hpp>
#define ll long long int
#define ld long double
#define pb push_back
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define mem(x,y) memset(x,y,sizeof(x))
#define sz(x) (int)x.size()
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pi 3.141592653589793238
#define INF 1e9+7
#define INFL 1e18
#define mod 1000000007
//#define mod 998244353
#define fast ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
using namespace std;
//using namespace __gnu_pbds; 
//typedef tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update> os;
//typedef tree<pii,null_type,less<pii>,rb_tree_tag,tree_order_statistics_node_update> os_pair;

ll power(ll x,ll n){ll res =1;while(n>0){if(n%2==1){res=res*x;}x=x*x;n=n/2;}return res;}
ll powm(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;}

//cout<< fixed << setprecision(10)
//__builtin_popcountll()



void solve(){
   ll n,i,j,k;
   cin>>n>>k;
   ll a[n+1];
   ll x=0;
   for(i=0;i<n;i++)
   {
      cin>>a[i];
      x=x^a[i];
   }
   a[n]=x;
   k--;
   k=k%(n+1);
   cout<<a[k]<<"\n";

}  
int main()
{
   fast;
   int t=1;
   //cin>>t;
   //assert(1 <= t && t <= 10);
   while(t--)
   {
      solve();
   }
   
}
0