soj#532 set p3175】的更多相关文章

传送门 分析 代码 #include<bits/stdc++.h> using namespace std; ; <<],Ans; int n,m,N; inline int sum(int x){ ; while(x){ )res++; x>>=; } return res; } int main(){ int i,j,k; scanf("%d",&n); N=<<n; ;i<N;i++)scanf("%lf&q…
SOJ 13983. Milk Scheduling 这是比赛题,还是作死的我最讨厌的英文题,题目大意就是有n头奶牛,要在喂奶截止时间前给他喂奶并得到相应的含量的牛奶. 一开始的想法就是挑选截止日期的最大产奶量的那头牛喂养,后来果不其然的WA了. 空闲的时间也可以给奶牛喂奶啥的....bug不要太多. 于是改来改去了,期间又WA了几发,总算是A掉了,但是代码也是要多搓有多搓,估计除了我自己没人看得懂. 所以后来选用了优先队列,STL的东西用顺手了还是蛮好用的.还用了pair类. 思路从截止日期最…
532. Building Foundation 题目连接: http://acm.sgu.ru/problem.php?contest=0&problem=532 Description A new office building is to appear in Berland soon. Its construction has just been started, and the first problem builders are facing is to lay the foundat…
SOP SOP-EIAJ-TYPE-II-14L SSOP SSOP-16L TSOP(Thin Small Outline Package) TSSOP(Thin Shrink Outline Package) HSOP28 SOJ-32L SOJ…
-----------------------------最优化问题------------------------------------- ----------------------常规动态规划  SOJ1162 I-Keyboard  SOJ1685 Chopsticks SOJ1679 Gangsters SOJ2096 Maximum Submatrix  SOJ2111 littleken bg SOJ2142 Cow Exhibition  SOJ2505 The County…
题目链接 说实话挺喜欢soj的界面,简简单单,没有多余的东西hhh(但是简单到连内存限制,时间限制都看不到了. 题意是有个“奇葩”的主人公,吃饭要用三根筷子.两根短的一根长的. 现在给你n根筷子,要在里面挑k+8对筷子(一对三根,有一根最长的,设为Ai <= Bi <= Ci (Ai-Bi)^ 2 叫做 badness)使得 $\sum ^{k}_{i=1}\left( A_{i}-B_{i}\right) ^{2}$ 最小 emmmmm其实不放在dp分类里面我看不出是dp,以为是贪心(太菜了…
Codeforces Round #532 (Div. 2) A - Roman and Browser #include<bits/stdc++.h> #include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<cmath> #include<algorithm> #include<queue> #inclu…
题目描述 设a.b.c均是0到9之间的数字,abc.bcc是两个三位数,且有:abc+bcc=532.求满足条件的所有a.b.c的值. 输入描述: 题目没有任何输入. 输出描述: 请输出所有满足题目条件的a.b.c的值. a.b.c之间用空格隔开. 每个输出占一行. #include<iostream> using namespace std; int main() { int a,b,c; ;a<=;a++) { ;b<=;b++) { ;c<=;c++) { +b*+c…
POJ 2251 Dungeon Master /UVA 532 Dungeon Master / ZOJ 1940 Dungeon Master(广度优先搜索) Description You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It ta…
题目链接:[http://acm.scu.edu.cn/soj/problem.action?id=4552] 题意:给你n种卡牌,每种卡牌有无限多个,每次从中抽取一张卡牌,问:1.集齐这n种卡牌需要抽取次数的期望,2.抽取m次,刚好(要保证最后一抽牌刚好满足抽了n张不同的牌)集齐n张卡牌的概率. 数据范围:n<=15,m<=35;(尼玛,比赛的时候数据范围都不给清楚,只在discuss里面说了一下,还不通知). 题解:对于第一问:公式n*(1+1/2+1/3+....+1/n);第二问:dp…