結果

問題 No.64 XORフィボナッチ数列
コンテスト
ユーザー Yut176
提出日時 2016-10-05 15:09:18
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -fplugin=/usr/lib/yukicoder/noavx512-gcc15.so -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
RE  
実行時間 -
コード長 409 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 425 ms
コンパイル使用メモリ 97,108 KB
実行使用メモリ 8,236 KB
最終ジャッジ日時 2026-09-27 15:55:13
合計ジャッジ時間 1,967 ms
ジャッジサーバーID
(参考情報)
judge4_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 7 RE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<sstream>
#include<cmath>
using namespace std;


int main(){

  long long int a, b, n;
  cin >> a >> b >> n;
  vector<long long int> f(n+1);
  f[0] = a;
  f[1] = b;
  for(int i=2; i<n+1; i++){
    f[i] = f[i-1] ^ f[i-2];
  }
  cout << f[n] << endl;
  return 0;
}
0