upc 组队赛18 STRENGTH【贪心模拟】】的更多相关文章

STRENGTH 题目链接 题目描述 Strength gives you the confidence within yourself to overcome any fears, challenges or doubts. Feel the fear and do it anyway! If you have been going through a rough time and feel burnt out or stressed, the Strength card encourages…
THE WORLD 题目链接 题目描述 The World can indicate world travel, particularly on a large scale. You mau be lucky enough to be embarking on a six-month overseas trip, or are working, studying or living overseas for an extended period of time. Similarly, this…
WTMGB 题目链接 题目描述 YellowStar is very happy that the FZU Code Carnival is about to begin except that he has to prepare problems for it. Because the statement of each problem is written in English! YellowStar types the statements slowly witb high error r…
题目传送门 /* 贪心 + 模拟:首先,如果蜡烛的燃烧时间小于最少需要点燃的蜡烛数一定是-1(蜡烛是1秒点一支), num[g[i]]记录每个鬼访问时已点燃的蜡烛数,若不够,tmp为还需要的蜡烛数, 然后接下来的t秒需要的蜡烛都燃烧着,超过t秒,每减少一秒灭一支蜡烛,好!!! 详细解释:http://blog.csdn.net/kalilili/article/details/43412385 */ #include <cstdio> #include <algorithm> #i…
题目传送门 /* 题意:一串字符串,问要最少操作数使得成为合法的后缀表达式 贪心+模拟:数字个数 >= *个数+1 所以若数字少了先补上在前面,然后把不合法的*和最后的数字交换,记录次数 岛娘的代码实在难懂啊~ */ /************************************************ * Author :Running_Time * Created Time :2015-8-16 14:29:49 * File Name :K.cpp **************…
Wilbur and Array Time Limit: 2000MS   Memory Limit: 262144KB   64bit IO Format: %I64d & %I64u Submit Status Description Wilbur the pig is tinkering with arrays again. He has the array a1, a2, ..., an initially consisting of n zeros. At one step, he c…
18/9/22NOIP模拟考 其实本来是有多组数据的,出题人忘记在题面上加了   斜眼笑 期望得分:100:实际得分:100 由于种种原因,拿到题的时候已经过去了0.5h+... 然后因为这道题数据范围比较大,所以..就想到了找规律 没想到居然A了  开心 这道题一共出现了三种做法: 1.出题人的std:据说是旋转坐标系什么鬼的,没听说过... 2.某人:从一个点做一个斜率为±1的一次函数,然后...如图 3.大部分人(包括我):分别求出两点横纵坐标之差的绝对值,然后取max,完事 4.极少部分…
18/9/21模拟赛 期望得分:100:实际得分:0  qwq 拿到题目第一眼,我去,这不是洛谷原题(仓鼠找Sugar)吗 又多看了几眼,嗯,对,除了是有多组数据外,就是原题 然后码码码....自以为写的很对 qwq 评测结束后...为什么我T1没有输出啊啊啊... 经某童鞋帮忙,发现 第一次被文件输入输出坑 qwqwq... 加上后就A了,白丢100 pts 蓝瘦 思路:树剖分别求LCA,然后判断LCA是否在另一条路径上 不要忘记清空数组! #include <algorithm> #inc…
Lattice's basics in digital electronics 题目链接 题目描述 LATTICE is learning Digital Electronic Technology. He is talented, so he understood all those pieces of knowledge in 10−9 second. In the next 10−9 second, he built a data decoding device that decodes…
Progressive Scramble 题目描述 You are a member of a naive spy agency. For secure communication,members of the agency use a very simple encryption algorithm – which changes each symbol in the message 'progressively', i.e., based on the symbols preceding i…