Ural Sport Programming Championship 2015】的更多相关文章

Ural Sport Programming Championship 2015 A - The First Day at School 题目描述:给出课程安排,打印一个课程表. solution 暴力模拟. B - Maths 题目描述:给定一个数\(n\),找出一个序列\(a_i\)满足\(\forall i \in [2, n], \sum_{j=1}^{j \leq i} a_j\) 有\(a_i\)个约数. solution 暴力搜索,发现和不会超过\(2 \times 10^6\),…
// Change of Scenery 1 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <vector> #include <utility> #include <queue> using namespace std; typedef long long ll; typedef pair<…
Method ringing is used to ring bells in churches, particularly in England. Suppose there are 6 bells that have 6 different pitches. We assign the number 1 to the bell highest in pitch, 2 to the second highest, and so on. When the 6 bells are rung in…
In an unprecedented turn of events, goblins recently launched an invasion against the Nedewsian city of Mlohkcots. Goblins—small, green critters—love nothing more than to introduce additional entropy into the calm and ordered lives of ordinary people…
Ada, Bertrand and Charles often argue over which TV shows to watch, and to avoid some of their fights they have finally decided to buy a video tape recorder. This fabulous, new device can record kk different TV shows simultaneously, and whenever a sh…
You're investigating what happened when one of your computer systems recently broke down. So far you've concluded that the system was overloaded; it looks like it couldn't handle the hailstorm of incoming requests. Since the incident, you have had am…
2019-2020 10th BSUIR Open Programming Championship. Semifinal GYM链接https://codeforces.com/gym/103637 K 题意: 给定$n$个二进制下不超过$m$位的数,找到一个二进制下不超过$m$位且至多有$k$个…
1227. Rally Championship Time limit: 1.0 secondMemory limit: 64 MB A high-level international rally championship is about to be held. The rules of the race state that the race is held on ordinary roads and the route has a fixed length. You are given…
今日份的训练题解,今天写出来的题没有昨天多,可能是因为有些事吧... Gym100814B 这个题就是老师改卷子,忘带标准答案了,但是他改了一部分卷子,并且确定自己改的卷子没出错,他想从改过的卷子里把标准答案推出来. 因为是选择题,答案就是A,B,C,D里的一个,如果A,B,C,都不对,那就是D对.如果不确定就是?,就是这样的题目. 一开始写的忘记判断如果三个选项都不对,那么剩下的就是答案这个了... 代码写的很丑,想不到简单的写法... 代码: #include<iostream> #inc…
题目链接:http://codeforces.com/gym/100676/attachments 题意: 给一个字符串,有一些约束条件,两个位置要相同,有一些是问号,求最后有多少种方案回文? 分析: 每一个节点是一个集合,要是不同,有一个是问号,那么这个问号就是确定的(约束条件中,和回文的对称位置),单独的集合,他又是问号,就可以放26个字母了: #include <iostream> #include <cstdio> #include <cstring> usin…