IOI 2017 Practice Contest mountains】的更多相关文章

Mountains 题面 题意: 选最多的点使得两两看不见. 分析: 分治,solve(l,r)为区间[l,r]的答案.那么如果不选最高点,分治两边即可,选了最高点,那么在最高点看不见的区间里分治. 代码: #include"mountains.h" #include<bits/stdc++.h> using namespace std; ; int y[N]; int f[N][N]; bool Judge(int a,int b,int c) { // a see c…
I. Older Brother Your older brother is an amateur mathematician with lots of experience. However, his memory is very bad. He recently got interested in linear algebra over finite fields, but he does not remember exactly which finite fields exist. For…
L. Sticky Situation While on summer camp, you are playing a game of hide-and-seek in the forest. You need to designate a “safe zone”, where, if the players manage to sneak there without being detected,they beat the seeker. It is therefore of utmost i…
比赛地址[https://vjudge.net/contest/147011#problem/A].960626 题目一:[http://codeforces.com/problemset/problem/701/A].水题 题意:给出N张纸牌,N为偶数,每张纸牌上有数值,把这N张纸牌分给(N/2)个人,每个人分到两张纸牌,并且数值相同.一定存在解. 法一: #include<bits/stdc++.h> using namespace std; ], vis[]; int N; int ma…
2016弱校联盟十一专场10.3 传送门 B. Help the Princess! 计算皇后和士兵谁先到达出口即可. C. We don't wanna work! 两个优先队列维护工作中积极性最小的,空闲中积极性最高的. 两个队列倒来倒去就可以了. D. Parentheses 考虑最坏情况)))...(((. 假设有\(x\)个右括号,那么这种情况需要\(\frac{x(x+1)}{2}\)次操作. 将第一个左括号移动每往左移动一个位置,则需要的操作次数减一,直到移动到最左边则变成\(x-…
Atcoder vjudge 这标题好长... \(Description\) 给定一棵\(n\)个点的树.在每个点\(i\)你可以补充\(g_i\)的油量,经过一条边需要花费边长的油量.你可以选择从任意一个点出发,任意在树上走直到油量耗尽或不能走(不能重复经过同一个点).求最多能经过多少个点. \(n\leq10^5\). \(Solution\) 点分治.对每个分治重心\(rt\),求出从\(rt\)到子树内某个点至少需要多少初始油量.从子树内某个点到\(rt\),会剩下多少油量.然后sor…
camp给出的题解: 题解:贪心,先算出最小需要的长度.然后从左到右依次确定每一位.复杂度O(n)O(n) 长度为 2n2n 的串可以构造出需要 [0,1+3+...+2n-1][0,1+3+...+2n−1] 中所有的数,所以长度是单调的. 从左到右贪心着放的时候,右边的A的upper bound就是先放)再放(,这个的upper bound可以O(1)算出来 其实代码: 发现自己的贪心好弱... #include <bits/stdc++.h> using namespace std; t…
题意: 就是公主要逃跑,士兵要抓公主,问你能不能逃跑哇: 思路: 就是终点搞成起点,然后BFS一下就好了,最后枚举一下出口到公主的距离是不是<所有的到士兵的距离: #include <bits/stdc++.h> using namespace std; typedef long long LL; const int N=2e2+10; struct asd{ int x,y; }; int dx[4]={0,0,-1,1}; int dy[4]={1,-1,0,0}; char s[N…
原题: Time limit : 2sec / Memory limit : 256MB Score : 300 points Problem Statement This is an interactive task. There are N balls labeled with the first N uppercase letters. The balls have pairwise distinct weights. You are allowed to ask at most Q qu…
Daydreaming Stockbroker Gina Reed, the famous stockbroker, is having a slow day at work, and between rounds of solitaire she is day-dreaming. Foretelling the future is hard, but imagine if you could just go back in time and use your knowledge of stoc…
菜鸡队训练实录. 现场赛记录:[名称:奖项/排名] 2017: ICPC Shenyang:Gold/3 CCPC Hangzhou:Gold/3 ICPC Beijing:Gold/13 CCPC Final:Silver/22 ICPC Asia East Continent League Final:Gold/11 2018: WF:31th Place  All ended. To do List: 一有空就训练 POI2018 Stage I[Done] 战术研究: 读新题的优先级高于…
For each list of words, output a line with each word reversed without changing   the order of the words. Input You will be given a number of test cases. The first line contains a positive   integer indicating the number of cases to follow. Each case…
PROBLEM LINK: PracticeContest Author: adminTester: Kevin AtienzaEditorialist: Ajay K. VermaRussian Translator: Sergey KulikMandarian Translator: Gedi Zheng DIFFICULTY: Medium PREREQUISITES: Combinatorics, Modular Arithmetic PROBLEM: Given two integer…
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151 For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is…
North North West Time Limit: 10000ms, Special Time Limit:25000ms, Memory Limit:65536KB Total submit users: 71, Accepted users: 59 Problem 13406 : No special judgement Problem description We can describe detailed direction by repeating the directional…
Word Reversal Time Limit: 2 Seconds      Memory Limit:65536 KB For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is an…
题目连接: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1151 题目描述: For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multip…
题目描述: For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is an integer N, then a blank line followed by N input blocks.…
Comprehensive learning path – Data Science in Python Journey from a Python noob to a Kaggler on Python So, you want to become a data scientist or may be you are already one and want to expand your tool repository. You have landed at the right place.…
2016 ACM ICPC Asia Region - Tehran A - Tax 题目描述:算税. solution 模拟. B - Key Maker 题目描述:给出\(n\)个序列,给定一个序列,问\(n\)个序列中有多少个序列满足对应位的值小于或等于给定序列的值. solution 模拟. C - IOI 2017 Logo 题目描述:有\(m\)件作品,\(n\)个人投票,每个人可以选三件作品,分别给\(1, 2, 3\)分,每件作品按总分排序,总分相同按得\(3\)分的数量排序,还…
Reverse a Road II Time Limit: 10000ms, Special Time Limit:25000ms, Memory Limit:65536KB Total submit users: 10, Accepted users: 6 Problem 13411 : No special judgement Problem description JAG Kingdom is a strange kingdom such that its N cities are con…
For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each i…
For each list of words, output a line with each word reversed without changing the order of the words. This problem contains multiple test cases! The first line of a multiple input is an integer N, then a blank line followed by N input blocks. Each i…
FFF at Valentine Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1060    Accepted Submission(s): 506 Problem Description At Valentine's eve, Shylock and Lucar were enjoying their time as any oth…
Dying Light Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 513    Accepted Submission(s): 122 Problem Description LsF is visiting a local amusement park with his friends, and a mirror room su…
CSGO Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 127    Accepted Submission(s): 20 Problem Description Senior Pan is crazy about CSGO and she is so skilled. She can kill every enemy she sp…
Ch’s gift Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1354    Accepted Submission(s): 496 Problem Description Mr. Cui is working off-campus and he misses his girl friend very much. After a w…
Big binary tree Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 597    Accepted Submission(s): 207 Problem Description You are given a complete binary tree with n nodes. The root node is numbere…
Colorful Tree Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1539    Accepted Submission(s): 616 Sample Input 3 1 2 1 1 2 2 3 6 1 2 1 3 2 1 1 2 1 3 2 4 2 5 3 6 Sample Output Case #1: 6 Case #…
Function Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 652    Accepted Submission(s): 267 Sample Input 3 2 1 0 2 0 1 3 4 2 0 1 0 2 3 1 Sample Output Case #1: 4 Case #2: 4 Source 2017 Multi-U…