結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-29 14:34:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 265 bytes |
| コンパイル時間 | 524 ms |
| コンパイル使用メモリ | 70,240 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-14 06:45:09 |
| 合計ジャッジ時間 | 1,219 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 1 WA * 10 |
ソースコード
#include <iostream>
#include <vector>
int main() {
int f0,f1,n;
std::cin>>f0>>f1>>n;
std::vector<int> 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;
}