斐波那契数列(Fibonacci sequence),又称黄金分割数列、因数学家列昂纳多·斐波那契(Leonardoda Fibonacci)以兔子繁殖为例子而引入,故又称为“兔子数列”,指的是这样一个数列:1、1、2、3、5、8、13、21、34、……在数学上,斐波纳契数列以如下被以递推的方法定义 ...
分类:
编程语言 时间:
2018-12-10 21:58:12
阅读次数:
278
splay练习题: oj1160 维护数列 sequence oj1849 排序机械臂(sort) oj1160 大数据结构,写了半天,心态崩了..... #include<bits/stdc++.h> #define il inline #define _(d) while(d(isdigit(c ...
分类:
其他好文 时间:
2018-12-10 18:21:26
阅读次数:
155
Given a non-empty binary tree, find the maximum path sum. For this problem, a path is defined as any sequence of nodes from some starting node to any ...
分类:
其他好文 时间:
2018-12-10 13:50:35
阅读次数:
143
文件操作 文件路径:d:\a.txt 编码方式:utf-8,gbk,GB2312.... 操作方式:只读,只写,写读,读写,追加 等。 报错原因: UnicodeDecodeError: 'gb2312' codec can't decode byte 0xa6 in position 2: ill ...
分类:
编程语言 时间:
2018-12-09 18:55:04
阅读次数:
210
消息 调用消息 调用(procedure call)消息的发送者把控制传递给消息的接收者,然后停止活动,等待消息接受者放弃会返回控制 在Rational Rose(2016版本如图所示) 异步消息 异步(asynchronous)消息的发送者通过消息把信号传递给消息的接受者,然后继续自己的活动,不等 ...
分类:
其他好文 时间:
2018-12-09 17:52:46
阅读次数:
215
传送门 似乎正解很简单(就是一个很简单的容斥),然而我就是要写麻烦的2333 首先考虑到能够交换两个二进制位,那么一个数产生的贡献就只和它的二进制的$1$的个数相关,我们将$a$数组转化为$b$数组,其中$b_i$为$a_i$的二进制位数,而$sum_i$为$b_i$的前缀和。 然后我们考虑统计答案 ...
分类:
其他好文 时间:
2018-12-08 23:54:36
阅读次数:
233
题目传送门: "https://arc074.contest.atcoder.jp/tasks/arc074_c" 题目翻译 给你一行$n$个格子,你需要给每个格子填红绿蓝三色之一,并且同时满足$m$个约束。每个约束由$l,r,x$来形容,表示$l$到$r$之间的所有格子颜色种数必须为$x$,求方案 ...
分类:
其他好文 时间:
2018-12-08 17:55:10
阅读次数:
146
Snuke has an integer sequence A of length N.He will make three cuts in A and divide it into four (non-empty) contiguous subsequences B,C,D and E. The ...
分类:
其他好文 时间:
2018-12-08 13:35:52
阅读次数:
171
Equal Cut 题目描述 Snuke has an integer sequence A of length N. He will make three cuts in A and divide it into four (non empty) contiguous subsequences B ...
分类:
其他好文 时间:
2018-12-06 20:21:32
阅读次数:
146
CREATE USER shineyue40_wh PROFILE DEFAULT IDENTIFIED BY shineyue40_wh DEFAULT TABLESPACE shineyue40_wh TEMPORARY TABLESPACE temp ACCOUNT UNLOCK; GRANT ...
分类:
其他好文 时间:
2018-12-06 14:30:27
阅读次数:
193