Thor 题意: 第一行n和q,n表示某手机有n个app,q表示下面有q个操作. 操作类型1:app x增加一条未读信息. 操作类型2:一次把app x的未读信息全部读完. 操作类型3:按照操作类型1添加的顺序,按顺序读t条信息,注意这t条信息可能有的已经读过.如果读过也算前t条,会再读一遍. 最后输出每次操作有多少信息没读. 题解: 一看题,要30W,那肯定不可以n^2了,想一想,3种操作,一个vector够用吗,应该不够,所以再加个set,就差不多了.那么思路就是这样的: 首先要有个计数器c…
C. Thor time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Thor is getting used to the Earth. As a gift Loki gave him a smartphone. There are n applications on this phone. Thor is fascinated…
A. Hulk time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Dr. Bruce Banner hates his enemies (like others don't). As we all know, he can barely talk when he turns into the incredible Hulk. Th…
Codeforces Round #366 (Div. 2) A I hate that I love that I hate it水题 #I hate that I love that I hate it n = int(raw_input()) s = "" a = ["I hate that ","I love that ", "I hate it","I love it"] for i in ran…
Bakery 题目链接: http://codeforces.com/contest/707/problem/B Description Masha wants to open her own bakery and bake muffins in one of the n cities numbered from 1 to n. There are m bidirectional roads, each of whose connects some pair of cities. To bake…
A. Watching a movie time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have decided to watch the best moments of some movie. There are two buttons on your player: Watch the current minute…
A. Contest time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Misha and Vasya participated in a Codeforces contest. Unfortunately, each of them solved only one problem, though successfully sub…
这次出的题貌似有点难啊,Div.1的Standing是这样的,可以看到这位全站排名前10的W4大神也只过了AB两道题. A:http://codeforces.com/contest/705/problem/A 题意:输出形如I hate that I love that I hate ......it的句子,输入N表示形容词的个数 #include <map> #include <set> #include <cmath> #include <queue>…
CF 复仇者联盟场... 水题 A - Hulk(绿巨人) 输出love hate... #include <bits/stdc++.h> typedef long long ll; const int N = 1e5 + 5; int main() { int n; scanf ("%d", &n); printf ("I hate"); for (int i=1; i<n; ++i) { if (i & 1) printf (&…
Description Peter Parker wants to play a game with Dr. Octopus. The game is about cycles. Cycle is a sequence of vertices, such that first one is connected with the second, second is connected with third and so on, while the last one is connected wit…