From 420bc16dad01e48c1f93fbb0974ad8b4bc54e415 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Mon, 24 Oct 2016 16:42:46 +0800 Subject: [PATCH] Create 1864.cpp --- QUSTOJ/1864.cpp | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 QUSTOJ/1864.cpp diff --git a/QUSTOJ/1864.cpp b/QUSTOJ/1864.cpp new file mode 100644 index 0000000..35ce11a --- /dev/null +++ b/QUSTOJ/1864.cpp @@ -0,0 +1,49 @@ +#include +using namespace std; +#include +using namespace std; + +template +struct fib +{ + enum {result=fib::result+fib::result}; +}; + +template<> +struct fib<0> +{ + enum {result=1}; +}; + +template<> +struct fib<1> +{ + enum{ result=1}; +}; + +int x[15]; + +int main() +{ + x[0]=fib<0>::result; + x[1]=fib<1>::result; + x[2]=fib<2>::result; + x[3]=fib<3>::result; + x[4]=fib<4>::result; + x[5]=fib<5>::result; + x[6]=fib<6>::result; + x[7]=fib<7>::result; + x[8]=fib<8>::result; + x[9]=fib<9>::result; + x[10]=fib<10>::result; + x[11]=fib<11>::result; + x[12]=fib<12>::result; + x[13]=fib<13>::result; + x[14]=fib<14>::result; + int a; + cin>>a; + cout<