結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
|
提出日時 | 2016-08-29 14:43:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 320 bytes |
コンパイル時間 | 1,638 ms |
コンパイル使用メモリ | 168,332 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-14 06:45:46 |
合計ジャッジ時間 | 2,801 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 RE * 4 |
ソースコード
#include <iostream> #include <vector> #include <bits/stdc++.h> int main() { unsigned long long f0,f1,n; std::cin>>f0>>f1>>n; std::vector<unsigned long long> fib; fib.resize(n+1); fib[0]=f0; if(n>0){ fib[1]=f1; } for(int i=2;i<n+1;i++){ fib[i]=fib[i-1]^fib[i-2]; } std::cout<<fib[n]<<std::endl; return 0; }