Round #427 A. Key races(Div.2)】的更多相关文章

  time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s c…
Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s characters. The first participant types one character in v1 milliseconds and has ping t1 milliseconds. The secon…
s <= c是最骚的,数组在那一维开了10,第八组样例直接爆了- - /* CodeForces 835C - Star sky [ 前缀和,容斥 ] | Codeforces Round #427 (Div. 2) 题意: 有一片 100*100 的星空,上面有 n 颗星星,每个星星有一个亮度,且在 0~C 范围内周期性变化,现在给出 q 个查询,每个查询给出时间和一个矩形,求在该时间时矩形内星星的亮度和. c <= 10 分析: 由于 c <= 10,则星星的亮度只有11种情况,全部…
证明在Tutorial的评论版里 /* CodeForces 835D - Palindromic characteristics [ 分析,DP ] | Codeforces Round #427 (Div. 2) 题意: 定义 k 回文串满足: 1. 左右子串相等 2. 左右子串为k-1回文串 1 回文串 就是回文串 问你字符串s的子串的每阶回文子串的数目 分析: 研究一下可以发现 k 回文串的要求等价于 1. 本身是回文串 2. 左右子串是k-1回文串 然后可以dp了,还有一个结论是: 若…
A. Key races 题目链接:http://codeforces.com/contest/835/problem/A 题目意思:两个比赛打字,每个人有两个参数v和t,v秒表示他打每个字需要多久时间,等这个这个字传递过去需要t秒,而且在打第一个字之前也会有一个反应时间t.问第一个人可不可以获胜. 题目思路:这个题目当时题目没读懂,明白之后就是一个非常简单的题目了. (s*v1+2*t1)<(s*v2+2*t2)第一个人就可以获胜 (s*v1+2*t1)==(s*v2+2*t2) 就会平局,否…
Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consisting of s characters. The first participant types one character in v1 milliseconds and has ping t1 milliseconds. The secon…
Codeforces Round #539 (Div. 1) A. Sasha and a Bit of Relax description 给一个序列\(a_i\),求有多少长度为偶数的区间\([l,r]\)满足\([l,mid]\)的异或和等于\([mid+1,r]\)的异或和. solution 等价于询问有多少长度为偶数的区间异或和为\(0\). 只需要两个位置的异或前缀和与下标奇偶性相同即可组成一个合法区间. #include<cstdio> #include<algorith…
VK Cup 2015 - Round 1 (unofficial online mirror, Div. 1 only)E. The Art of Dealing with ATM Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xxx  Solved: 2xx 题目连接 http://codeforces.com/contest/529/problem/E Description ATMs of a well-known bank of a sm…
Codeforces Round #542 [Alex Lopashev Thanks-Round] (Div. 2) 题目链接:https://codeforces.com/contest/1130 A. Be Positive 题意: 给出n个数,看是否正数的个数过半或者负数的个数过半. 题解:水题,代码如下: #include <bits/stdc++.h> using namespace std; ; int n; double a[N]; int main(){ ios::sync_…
A. Key races time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Two boys decided to compete in text typing on the site "Key races". During the competition, they have to type a text consis…