摘要: #include #include using namespace std; int three(int a[]) { return a[1]*a[5]*a[9]+a[2]*a[6]*a[7]+a[3]*a[4]*a[8]- a[3]*a[5]*a[7]-a[6]*a[8]*a[1]-a[2]*a[4]*a[9]; } int main() { int x[5][5],... 阅读全文
posted @ 2017-10-21 18:22 小九xD 阅读(744) 评论(0) 推荐(0) 编辑
摘要: #if _MSC_VER>=1900 #include "stdio.h" _ACRTIMP_ALT FILE* __cdecl __acrt_iob_func(unsigned); #ifdef __cplusplus extern "C" #endif FILE* __cdecl __iob_f 阅读全文
posted @ 2017-09-30 16:21 小九xD 阅读(601) 评论(0) 推荐(0) 编辑
摘要: 题目:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1305 统计1和2的数量 1-1是2 1-x(不为1)是1 2-2是1 时间复杂度O(n) 阅读全文
posted @ 2017-09-28 21:23 小九xD 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 题目:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1284 容斥定理裸题 定理: 阅读全文
posted @ 2017-09-23 21:20 小九xD 阅读(454) 评论(0) 推荐(0) 编辑
摘要: 题目:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1091 先按线段起点升序排序,此时有两大种情况: 第一种是第二根线段的左边在第一根线段右边的右边, 即两根线段不相交,此时要将终点更新,因为是按起点升序排序,如果第二根 阅读全文
posted @ 2017-09-18 20:28 小九xD 阅读(1007) 评论(1) 推荐(0) 编辑
摘要: 题目:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1289 从左往右将数字压入栈里(想象成一个水平向右的栈),如果鱼是向左的让它一直吃,直到被吃或者吃完为止 阅读全文
posted @ 2017-09-17 13:44 小九xD 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 使用java BigInteger 大数加法 http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1005 大数乘法 http://www.51nod.com/onlineJudge/questionCode.html#!pro 阅读全文
posted @ 2017-09-15 17:51 小九xD 阅读(128) 评论(0) 推荐(0) 编辑
摘要: http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1136 φ(x)=x(1-1/p(1))(1-1/p(2))(1-1/p(3))(1-1/p(4))…..(1-1/p(n)) p(1) p(2) p(n)是X的质因数 最后 阅读全文
posted @ 2017-09-01 17:46 小九xD 阅读(138) 评论(0) 推荐(0) 编辑
摘要: http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1174 第一次学线段树,感觉脑子里一片浆糊 阅读全文
posted @ 2017-08-31 16:23 小九xD 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 题目:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1242 阅读全文
posted @ 2017-08-30 11:04 小九xD 阅读(188) 评论(0) 推荐(0) 编辑