codeforces Expecting Trouble】的更多相关文章

link:http://codeforces.com/contest/345/problem/A 写完这道题目才发现这场比赛只能用Ada语言提交== 好吧,逗我玩呢 考的是数学期望公式,二项分布的期望E=np C++代码:(我可不会Ada……=_=) #include <cstdio> #include <cstdlib> #include <iostream> #include <cstring> using namespace std; int main…
一开始读错题了...想当然地认为只能相邻元素交换...(然后换了两种写法WA了4发,5分钟切A的优势荡然无存) 题目链接:https://codeforces.com/contest/1365/problem/B 题意 有 $n$ 个数,每个数的种类为 $0$ 或 $1$,不同种类的元素可以任意交换,问这些数能否排为非递减序. 题解 如果两个种类都有,一定可以排为有序,稍微证明一下: 将种类为 $0$ 的数都交换到最左边,种类为 $1$ 的数都交换到最右边 每个种类的数可以利用另一个种类的一个数…
LINK time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The teacher gave Anton a large geometry homework, but he didn't do it (as usual) as he participated in a regular round on Codeforces. In…
Escape Time Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 148B Description The princess is going to escape the dragon's cave, and she needs to plan it carefully. The princess runs at vp mil…
B. Anton and Lines Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/593/problem/B Description The teacher gave Anton a large geometry homework, but he didn't do it (as usual) as he participated in a regular round on Codeforc…
http://codeforces.com/contest/794/problem/C Description Oleg the client and Igor the analyst are good friends. However, sometimes they argue over little things. Recently, they started a new company, but they are having trouble finding a name for the…
A. Buying A House time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Zane the wizard had never loved anyone before, until he fell in love with a girl, whose name remains unknown to us. The gi…
Description Polycarp is in really serious trouble — his house is on fire! It's time to save the most valuable items. Polycarp estimated that it would take tiseconds to save i-th item. In addition, for each item, he estimated the value of di — the mom…
A. Buying A House time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Zane the wizard had never loved anyone before, until he fell in love with a girl, whose name remains unknown to us. The gi…
Zane the wizard is going to perform a magic show shuffling the cups. There are n cups, numbered from 1 to n, placed along the x-axis on a table that has m holes on it. More precisely, cup i is on the table at the position x = i. The problematic bone…