A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed…
题目链接:http://codeforces.com/problemset/problem/716/A 题目大意: 输入 n c, 第二行 n 个整数,c表示时间间隔 秒. 每个整数代表是第几秒.如果本次和下一秒间隔>c 则之前的计数次数清0,否则每次输入一个数,计数++: 问最后剩几个数. 举例: input: 6 51 3 8 14 19 20 output: 3 解析: 1 3 8 此时剩 3 个数,因为每次输入距离下次输入时间间隔都<5.下一次是 14 距离上一次 间隔为14-8>…
Codeforces Round #372 (Div. 2) 不知不觉自己怎么变的这么水了,几百年前做A.B的水平,现在依旧停留在A.B水平.甚至B题还不会做.难道是带着一种功利性的态度患得患失?总共才打的几场 CF 节节掉分.学了快一年了成了个水货. 废话就不多说了,来看这次的这两题吧.很多CF的题是不想写博客的,如果题目质量很好的话我倒是愿意留在我的博客里: A. Crazy Computer time limit per test 2 seconds memory limit per te…
Codeforces Round #372 (Div. 2) C. Plus and Square Root 题意 一个游戏中,有一个数字\(x\),当前游戏等级为\(k\),有两种操作: '+'按钮:使得\(x=x+k\) '√'按钮:使得\(x=\sqrt{x}\),此时\(x\)必须是平方数,游戏等级加1,即\(k=k+1\),且\(\sqrt{x}\)是\(k+1\)的倍数. 游戏开始时,\(x=2,k=1\),输出\(n(n \le 10^5)\)个数,表示每个等级对应的\(\frac…
A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed…
A. Crazy Computer time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed…
Description ZS the Coder is coding on a crazy computer. If you don't type in a word for a c consecutive seconds, everything you typed disappear! More formally, if you typed a word at second a and then the next word at second b, then if b - a ≤ c, jus…
B. Complete the Word time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder loves to read the dictionary. He thinks that a word is nice if there exists a substring (contiguous segmen…
B. Complete The Graph time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder has drawn an undirected graph of n vertices numbered from 0 to n - 1 and m edges between them. Each edge…
C. Plus and Square Root time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ZS the Coder is playing a game. There is a number displayed on the screen and there are two buttons, ' + ' (plus) an…