[ZOJ 3076] Break Standard Weight】的更多相关文章

题目连接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5009 题意:给你两个数字,可以把其中一个拆成两个数字,计算这三个数字通过加或者减能组成的最多数字. 分析下三个数通过加或者减的组合以及数据规模来看,直接暴力枚举即可,枚举过程中注意不要有遗漏,最好在心里记个顺序,有条理进行枚举. 反思:当遇到数据规模不大的情况,想不出快捷方法,尝试用暴力试试. AC代码: #include <cstdio> #include &l…
Break Standard Weight Time Limit: 2 Seconds                                     Memory Limit: 65536 KB                             The balance was the first mass measuring instrument invented. In its traditional form, it consists of a pivoted horizon…
The balance was the first mass measuring instrument invented. In its traditional form, it consists of a pivoted horizontal lever of equal length arms, called the beam, with a weighing pan, also called scale, suspended from each arm (which is the orig…
/*题意:将两个砝码中的其中一个分成两块,三块组合最多有几种情况(可以只有一块,或者两块). 组合情况 i j m 三块砝码 (i+j)-m=m-(i+j) i+j i-j=j-i  i j m (i+m)-j=j-(i+m) i+m i-m=m-i   i+j+m (j+m)-i=i-(j+m) j+m j-m=m-j */ #include<string.h> #include<stdio.h> #include<string.h> #include<stdl…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5009 题目意思:给出两个mass:x 和 y,问如何将其中一个 mass 一分为二(当然分完之后它们的和要等于原来的mass,或x 或 y),使得利用这三个mass 可称的数量最大.输出这个最大数量. 网上参考别人用STL中的set来写,太厉害了!!!考虑到set对于重复的元素只存储一个,那么当三个mass组合的过程中有重复的,它都会自动舍弃有重复的,不需要用if来…
Problem The balance was the first mass measuring instrument invented. In its traditional form, it consists of a pivoted horizontal lever of equal length arms, called the beam, with a weighing pan, also called scale, suspended from each arm (which is…
赛后总结: T:今天下午参加了答辩比赛,没有给予队友很大的帮助.远程做题的时候发现队友在H上遇到了挫折,然后我就和她们说我看H吧,她们就开始做了另外两道题.今天一人一道题.最后我们在研究一道dp的时候,被疯狂卡时间和内存,也是最后三十分钟开始写的,感觉受到了挫折.┭┮﹏┭┮ J:今天开场一个多小时都在看H,还是没打出来,就换了别的题.彭彭说他打过F,F就交给他了.看了G好久,感觉好像能做,就做出来了(while循环没弄好,T了一次,简直是个傻子).最后看了E和J,打了J,还是wa了,自己想的样例…
Applications http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5008 string set 专场 #include<cstdio> #include<cstring> #include<cmath> #include<iostream> #include<algorithm> #include<set> #define mt(a,b) memset(a…
The 9th Zhejiang Provincial Collegiate Programming Contest A    Taxi Fare    25.57% (166/649)     (水题)    计算两种计程车计费方式的差值, 注意四舍五入    B    Unrequited Love    14.00% (7/50)    水题) C    Count the Trees    9.87% (8/81)   (二叉树)    卡特兰数应用的问题     D    Draw S…
B - Break Standard Weight The balance was the first mass measuring instrument invented. In its traditional form, it consists of a pivoted horizontal lever of equal length arms, called the beam, with a weighing pan, also called scale, suspended from e…