上一页 1 ··· 3 4 5 6 7 8 9 10 下一页
摘要: #include #define maxn 5000005 using namespace std; struct edge { int u=0; int v=0; int w=0; int next=0; }edge[2*maxn]; int head[maxn]; int cnt=0; int n; void addedge(int u,int v,int ... 阅读全文
posted @ 2018-06-02 23:28 行远山 阅读(371) 评论(0) 推荐(0) 编辑
摘要: You are given kk sequences of integers. The length of the ii-th sequence equals to nini. You have to choose exactly two sequences ii and jj (i≠ji≠j) s 阅读全文
posted @ 2018-06-02 17:33 行远山 阅读(181) 评论(0) 推荐(0) 编辑
摘要: time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output time limit per test 1 second time limit p 阅读全文
posted @ 2018-05-28 21:31 行远山 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 2.邻接表实现 阅读全文
posted @ 2018-05-23 20:45 行远山 阅读(190) 评论(0) 推荐(0) 编辑
摘要: RMQ操作。 区间修改/求和。 阅读全文
posted @ 2018-05-21 21:12 行远山 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 1.唯一分解定理,也叫算术基本定理,指的是任何n>=2,都可以分解为n=p1*p2*p3*.....pn,其中pi为质数。 其包括两个断言:断言1:数n可以以某种方式分解成素数乘积。 断言2:仅有一种这样的因数分解。(除因数重排外)。 其可以化简为 2.如何实现: 实现方法1 #include <b 阅读全文
posted @ 2018-05-19 16:27 行远山 阅读(2115) 评论(0) 推荐(0) 编辑
摘要: Kuro is living in a country called Uberland, consisting of nn towns, numbered from 11 to nn, and n−1n−1 bidirectional roads connecting these towns. It 阅读全文
posted @ 2018-05-17 11:54 行远山 阅读(349) 评论(0) 推荐(0) 编辑
摘要: You are given several queries. Each query consists of three integers pp, qq and bb. You need to answer whether the result of p/qp/q in notation with b 阅读全文
posted @ 2018-05-17 11:16 行远山 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Alice and Bob are playing a stone game. There are n piles of stones. In each turn, a player can remove some stones from a pile (the number must b 阅读全文
posted @ 2018-05-15 11:15 行远山 阅读(278) 评论(0) 推荐(0) 编辑
摘要: 题目描述 We define an element ai in a sequence "good", if and only if there exists a j(1≤ j < i) such that aj < ai.Given a permutation p of integers from 阅读全文
posted @ 2018-05-15 11:07 行远山 阅读(339) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 下一页