CodeForcesGym 100676G Training Camp】的更多相关文章

G. Training Camp Time Limit: 1000ms Memory Limit: 262144KB This problem will be judged on CodeForcesGym. Original ID: 100676G64-bit integer IO format: %I64d      Java class name: (Any)   Montaser is planning to train very hard for ACM JCPC 2015; he h…
G. Training Camp[ Color: Yellow ]Montaser is planning to train very hard for ACM JCPC 2015; he has prepared a list with n topicsto study in the next n days, one topic every day.Montaser knows that some topics depend on other topics, so he asked coach…
2015 UESTC Winter Training #7 2010-2011 Petrozavodsk Winter Training Camp, Saratov State U Contest 据说这套题写出3题就是金牌水平了... Problem D. Group Stage 足球比赛,现在有n(2<= n <=100)支球队.要从中选拔m(1<= m <=n-1)支球队,每支球队互相比赛一场,即比赛n*(n-1)/2场,胜者得3分,平局各得1分.最后从大到小列出排名,如果有…
2015-2016 Petrozavodsk Winter Training Camp, Nizhny Novgorod SU Contest B. Forcefield 题意 给你一维平面上n个镜子,镜子的朝向有正面和背面,如果光束从正面穿过,会摧毁镜子,并且光束会反向:如果从背面穿过的话,什么都不会发生. 光束一开始从X位置,射向0点,然后你人在0点,会反射光束. 问你要破坏所有镜子,人需要反弹光束多少次. 数据范围100000 题解 其实模拟就好了,击破镜子的顺序就那么一种. 代码 #in…
Petrozavodsk Summer Training Camp 2017 Day 9 Problem A. Building 题目描述:给出一棵树,在树上取出一条简单路径,使得该路径的最长上升子序列最长,问最长的长度. solution 最常见的想法就是树状dp,但空间不太够,所以选择直接计数. 每个点记住两个\(vector(f, g)\),\(f_i\)表示从叶子到\(i\)的最长的递增序列,\(g_i\)表示从叶子到\(i\)的最长的递减序列. 当算以\(i\)为根的子树的答案时,假设…
Petrozavodsk Summer Training Camp 2017 Problem A. Connectivity 题目描述:有\(n\)个点,现不断地加边.每条边有一种颜色,如果一个点对\((a, b)\),满足\(a=b\)或对于每一种颜色的子图(图中只有该种颜色的边),\(a, b\)总是连通,则该点对称为好连通.求出每加一条边,好连通的点对数. solution 每个子图用并查集维护连通块,并且用\(vector\)记录每个连通块的点,便于之后进行答案的统计,合并时启发式合并即…
Petrozavodsk Winter Training Camp 2018 Problem A. Mines 题目描述:有\(n\)个炸弹放在\(x\)轴上,第\(i\)个位置为\(p_i\),爆炸半径为\(r_i\),引爆第\(i\)个炸弹的花费为\(c_i\).但一个炸弹\(i\)爆炸时,在爆炸半径内的其它炸弹都会爆炸,而且不用花费.有\(Q\)个操作,每次改变一个炸弹的花费,然后输出引爆所有炸弹的最小费用. solution 不会. Problem B. Balls 题目描述:有\(n\…
Warsaw U Contest Petrozavo dsk Summer 2011 Training Camp, Monday, September 5, 2011 Problem A.ChocolateProblem B.Programming ContestProblem C.DrawingProblem D.EvacuationProblem E.Insp ectionProblem F.MeteorsProblem G.PartyProblem H.Perio dicityProble…
2017 湖南省赛 K Football Training Camp 题意: 在一次足球联合训练中一共有\(n\)支队伍相互进行了若干场比赛. 对于每场比赛,赢了的队伍得3分,输了的队伍不得分,如果为平局则两支队伍各得1分. 现在给出每只队伍的得分\(s_i\),问最少和最多进行了多少场比赛,不超过1000组数据 \(1<=n<=20\) \(0<=s_i<=200\) 思路: 比赛的时候脑子不清醒,被这个配对难住了,暴力往搜索方面想了想,肯定会TLE啦,就放弃了 现在清醒一点,胜…
2016 Al-Baath University Training Camp Contest-1 A题:http://codeforces.com/gym/101028/problem/A 题意:比赛初始值是1500,变化了几次,得到的正确结果和bug后的是否相等.(Tourist大佬好 Y(^o^)Y) #include <bits/stdc++.h> using namespace std; int main() { int t; cin>>t; while(t--) { in…