链接:https://www.nowcoder.com/acm/contest/89/A 来源:牛客网 1.题目描述 The Great Wall story of Meng Jiangnv’s Bitter Weeping happened during the Qin Dynasty (221BC- 206BC). Meng jiangnv was a beauty in the Qin Dynasty, and she lived happily with her husband. At…
题目描述:There are n cities in Byteland, and the ith city has a value ai. The cost of building a bidirectional road between two cities is the sum of their values. Please  calculate the minimum cost of connecting these cities, which means any two cities c…
链接:https://www.nowcoder.com/acm/contest/125/A来源:牛客网 Tony and Macle are good friends. One day they joined a birthday party together. Fortunately, they got the opportunity to have dinner with the princess, but only one person had the chance. So they de…
..拿金了 没给学校丢脸 A ....SB题啊 比赛的时候都没看 裸的一个bitset前缀和 先开一个1e4*1e4的二维bitset数组 初始第i个数组的值为1 << i (即B[i]=1 B[i]<<=i) 很容易我们可以知道要单独翻转某一位而不去影响其他位的话 方法是唯一的 然后我们从可以后往前DP 就可以知道要单独翻转某一位的话需要翻转那些位 最后的每次翻转过后的答案就是   上一个答案^PreL-1 ^PreR 注意用cout的话容易System Error......(…
题目描述 俄罗斯套娃是俄罗斯特产的木制玩具,一般由多个一样图案的空心木娃娃一个套一个组成,最多可达十多个,通常为圆柱形,底部平坦可以直立.颜色有红色,蓝色,绿色,紫色等.最普通的图案是一个穿着俄罗斯民族服装的姑娘,叫做“玛特罗什卡”,这也成为这种娃娃的通称. 彩虹岛也有自己的套娃,不过与俄罗斯套娃有所不同,其组成规则如下:1. 空心木娃娃只有正方体与球两种形状.2. 正方体娃娃与球体娃娃可以相互套,也可以相同形状之间套.3. 当两形状相切的时候使能够互相嵌套的,比如半径为2的球体能套在边长为4的…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6467 简单数学题 Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 308    Accepted Submission(s): 150 Problem Description 已知 F(n)=∑i=1n(i×∑j=inCij) 求 F(n) m…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=6464 免费送气球 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 264    Accepted Submission(s): 53 Problem Description 又到了GDUT一年一度的程序设计竞赛校赛的时间啦.同学们只要参加校赛,…