CF140D New Year Contest 题解】的更多相关文章

Content 小 G 想打一场跨年比赛,比赛从下午 \(18:00\) 开始一直持续到次日清晨 \(6:00\),一共有 \(n\) 道题目.小 G 在比赛开始之前需要花费 10 分钟考虑这些题目的复杂度,10 分钟之后 TA 会了解了每道题目需要做的时间 \(a_1,a_2,a_3,...,a_n\),然后他就会开始做这些题目,但要注意的是,如果在 \(0:00\) 之后交,就会有罚时,罚时为 \(0:00\) 到现在距离的时间长度,多次罚时会累加进入总罚时.现在,小 G 想知道自己最多能够…
H - A + B Strikes Back A + B is often used as an example of the easiest problem possible to show some contest platform. However, some scientists have observed that sometimes this problem is not so easy to get accepted. Want to try? Input The input co…
A: UVALive 6525 cid=61196#problem/A" style="color:blue; text-decoration:none">Attacking rooks 题解:点击打开链接 C: UVALive 6527 Counting ones 题解:点击打开链接 E: UVALive 6529 Eleven 题解:点击打开链接 F: UVALive 6530 Football 题解:点击打开链接 G: option=com_onlinejudge…
题目在这里>_< 发现这场比赛在网上没有完整的题解,甚至连题目代码都没人贴出来(大概是因为题目太水了吧...).所以宝宝就来写个题解,也就当作成长记录了233333 A. Window 题意很简单,给出n组x,y,求x*y的值 #include <cstdio> #include <algorithm> using namespace std; int main() { int n; long long x,y; scanf("%d",&n)…
想找原题请点击这里:传送门 原题: 题目背景 [Usaco2008 Jan] 题目描述 N ( ≤ N ≤ ) cows, conveniently numbered ..N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that is unique among…
$$2014-2015\ ACM-ICPC,\ NEERC,\ Southern\ Subregional\ Contest$$ A Nasta Rabbara B Colored Blankets 只要每组都能用两种以下的颜色合成即可,可以发现答案必然存在,考虑用数量最多的颜色和数量最少的颜色组合,递归处理 略证:颜色最少的数量\(\le \frac{k}{n}\),颜色最多的数量\(\ge \frac{k}{n}\),每次组合完成之后上述条件不变 //#pragma comment(link…
题目大意: 给你一些子网,求它们在整个网段的补集. 思路: 将子网转换成二进制建一棵Trie,直接DFS搜到没有了就记下来输出.注意:所给的子网会有交集,若搜到结尾就不向下搜了. 代码: #include<cstdio> #include<cstring> #include<iostream> #include<algorithm> #define M 40000 using namespace std; ],flag[M<<],trie[M&l…
[题目链接] A - Who Is The Winner 模拟. #include <bits/stdc++.h> using namespace std; int T; int n; struct X { string name; int num; int ti; }s[10010]; bool cmp(X&a,X&b){ if(a.num != b.num) return a.num > b.num; return a.ti < b.ti; } int main…
[题目链接] 这场比赛题面英文都好长... ... A - Zero or One 模拟. #include <bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a != b && a!=c) { cout <<"A"; return 0; } if(b != a && b!=c) { cou…
[题目链接] A - Streets of Working Lanterns - 2 首先将每一个括号匹配串进行一次缩减,即串内能匹配掉的就匹配掉,每个串会变成连续的$y$个右括号+连续$z$个左括号. 我们把缩减后的串分成四类: 第一类:只有左括号 第二类:左右括号都有,且$z$大于等于$y$ 第三类:左右括号都有,且$z$小于$y$ 第四类:只有右括号 类与类之间肯定是按第$1$,$2$,$3$,$4$类的顺序放置. 第一类内部和第四类内部可以随便放.第二类的放置顺序也很容易想. 问题出在第…