Codeforces 859D - Third Month Insanity】的更多相关文章

题意 有 \(2^n\) 个人要进行比赛,每次 \(2i\) 与 \(2i+1\) 号人进行比赛(\(i\in [0,2^{n-1})\) ).这一轮中赢的人进入下一轮.下一轮比赛的时候把进入这一轮的人按编号排好,仍然是像之前那样相邻的进行一次比赛.最后只剩下一个人. 数据给出对于 \(x,y\) ,\(x\) 打赢 \(y\) 的概率. 第 \(i\) 轮比赛会角逐出 \(2^{n-i}\) 个赢家.我们要在比赛开始前,猜每轮的赢家(一轮的赢家一定要是上一轮的赢家).第 \(i\) 轮每猜中一…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The annual college sports-ball tournament is approaching, which for trademark reasons we'll refer to as Third Month Insanity. There are a to…
题目链接: http://codeforces.com/contest/724 A. Checking the Calendar time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given names of two days of the week. Please, determine whether it is…
[codeforces 260]B. Ancient Prophesy 试题描述 A recently found Ancient Prophesy is believed to contain the exact Apocalypse date. The prophesy is a string that only consists of digits and characters "-". We'll say that some date is mentioned in the P…
A. New Year and Days 题目连接: http://www.codeforces.com/contest/611/problem/A Description Today is Wednesday, the third day of the week. What's more interesting is that tomorrow is the last day of the year 2015. Limak is a little polar bear. He enjoyed…
C. Report time limit per test:2 seconds memory limit per test:256 megabytes input:standard input output:standard output Each month Blake gets the report containing main economic indicators of the company "Blake Technologies". There are n commodi…
C. Report 题目连接: http://www.codeforces.com/contest/631/problem/C Description Each month Blake gets the report containing main economic indicators of the company "Blake Technologies". There are n commodities produced by the company. For each of th…
题目链接:http://codeforces.com/problemset/problem/304/B 题目意思:给出两个日期,需要算出这两个日期之间有多少日. 细心模拟就可以了.特别要注意的是,两个日期是同一年的处理.我的解决方法是,算出小的那一个日期的天数离它所处月份还有多少天,大的日期的天数加上去,还有一部分是它们之间相隔的月数总天数.另外,为了方便处理,保证了第一个处理的日期是较小的. #include <iostream> #include <cstdio> #inclu…
Codeforces Round 363 Div. 1 题目链接:## 点击打开链接 A. Vacations (1s, 256MB) 题目大意:给定连续 \(n\) 天,每天为如下四种状态之一: 不能进行运动或比赛 可以进行运动但不能比赛 可以进行比赛但不能运动 可以进行比赛或运动 对于每天,可以根据当天的状态选择运动,比赛或休息.但不能连续两天的选择均为运动或均为比赛.求在这 \(n\) 天中最少需要休息多少天. 数据范围:\(n \leq 100\) 简要题解:令 \(f_{i,0},f_…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Petr wants to make a calendar for current month. For this purpose he draws a table in which columns correspond to weeks (a week is seven consequ…