C. Wizards and Numbers 题目连接: http://codeforces.com/problemset/problem/167/C Description In some country live wizards. They love playing with numbers. The blackboard has two numbers written on it - a and b. The order of the numbers is not important. L…
B. Wizards and Huge Prize Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/167/problem/B Description One must train much to do well on wizardry contests. So, there are numerous wizardry schools and magic fees. One of such ma…
A. Wizards and Trolleybuses Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/167/problem/A Description In some country live wizards. They love to ride trolleybuses. A city in this country has a trolleybus depot with n trolle…
D. Wizards and Roads 题目连接: http://www.codeforces.com/contest/167/problem/D Description In some country live wizards. They love to build cities and roads. The country used to have k cities, the j-th city (1 ≤ j ≤ k) was located at a point (xj, yj). It…
E. Wizards and Bets 题目连接: http://www.codeforces.com/contest/167/problem/E Description In some country live wizards. They like to make weird bets. Two wizards draw an acyclic directed graph with n vertices and m edges (the graph's vertices are numbere…
Codeforces Round #114 (Div. 2) 代码 Codeforces Round #114 (Div. 2) C. Wizards and Trolleybuses 思路 每条车的到达时间不会小于前一辆车,计算两者时间取最大值. D. Wizards and Huge Prize 思路 \(f(i, j, k)\)表示前\(i\)场比赛赢\(j\)场袋子与奖牌的差值为\(k\)的概率. E. Wizards and Numbers 假设\(a \le b\),那么最后会进入状…
A. Wizards' Duel Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/591/problem/A Description Harry Potter and He-Who-Must-Not-Be-Named engaged in a fight to the death once again. This time they are located at opposite ends of…
Roman and Numbers time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Roman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sereja change his…
题目链接: http://codeforces.com/problemset/problem/401/D D. Roman and Numbers time limit per test4 secondsmemory limit per test512 megabytes 问题描述 Roman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sere…
A. Alyona and Numbers 题目连接: http://www.codeforces.com/contest/682/problem/A Description After finishing eating her bun, Alyona came up with two integers n and m. She decided to write down two columns of integers - the first column containing integers…