ACM-思维
文章平均质量分 56
蝉鸣的夏季
要在IT这条不归路上,越走越远了。
展开
-
带分数
题目描述 100 可以表示为带分数的形式:100 = 3 + 69258 / 714。 还可以表示为:100 = 82 + 3546 / 197。 注意特征:带分数中,数字1~9分别出现且只出现一次(不包含0)。 类似这样的带分数,100 有 11 种表示法。 输入 从标准输入读入一个正整数N (N 输出 程序输出该数字用数码1~9不重复不遗漏地组成带分数表示的全部种数。 样例输原创 2017-03-20 16:21:05 · 225 阅读 · 0 评论 -
tmk买礼物
Description 今天是校赛的日子,为了庆祝这么喜庆的日子,TMK打算买些礼物给女票LSH庆祝一下。 TMK进入了雪梨超市,然后刚踏入的一瞬间,店主就对TMK说:“恭喜你成为了本店第2147483647位顾客,本店在搞一个活动,对本店第2147483647位顾客进行赠送活动。你先看看你有多少钱?” TMK一摸口袋,发现只有n个硬币,每个硬币的价值为a[i]。 然后店主继续说:原创 2017-03-28 09:38:39 · 367 阅读 · 0 评论 -
Fix a Tree CodeForces - 698B
A tree is an undirected connected graph without cycles. Let's consider a rooted undirected tree with n vertices, numbered 1 through n. There are many ways to represent such a tree. One way is to cre原创 2017-03-15 20:34:13 · 307 阅读 · 0 评论 -
ZOJ - 2316 Matrix Multiplication
Let us consider undirected graph G = which has N vertices and M edges. Incidence matrix of this graph is N * M matrix A = {a ij}, such that a ij is 1 if i-th vertex is one of the ends of j-th edge an原创 2017-04-18 19:13:21 · 231 阅读 · 0 评论