J - Scarily interesting! URAL - 2021】的更多相关文章

This year at Monsters University it is decided to arrange Scare Games. At the Games all campus gathers at the stadium stands, and the Scare program students divide into two teams to compete in their abilities of scaring children. This year the two te…
2021. Scarily interesting! Time limit: 1.0 secondMemory limit: 64 MB This year at Monsters University it is decided to arrange Scare Games. At the Games all campus gathers at the stadium stands, and the Scare program students divide into two teams to…
Scarily interesting! 题目链接: http://acm.hust.edu.cn/vjudge/contest/126546#problem/D Description This year at Monsters University it is decided to arrange Scare Games. At the Games all campus gathers at the stadium stands, and the Scare program students…
题意:给定两个队伍的每个人的得分,让你安排怎么比赛才能使得观众知道冠军的时间最长. 析:贪心,很简单,就是先开始总分高的先出最差劲的,总分低的先出最厉害的,这个题当时实在是读的不明白啊,WA了好多次. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include…
Problem This year at Monsters University it is decided to arrange Scare Games. At the Games all campus gathers at the stadium stands, and the Scare program students divide into two teams to compete in their abilities of scaring children. This year th…
2021蓝桥杯省赛B组题目(C/C++)E.路径 最短路径, 因为变化情况比较多, 所以开始想的是深搜, 但是太慢了, 跑不出来, 后来就想着优化一下, 有的地方到另一个地方可能会考虑很多遍, 于是考虑了DP #include <bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> PII; const int N = 1e8+10, M = 21; LL res = 9999…
CSP J/S 初赛总结 2021/9/19 19:29 用官方答案估计 J 涂卡的时候唯一的一支 2B 铅笔坏了,只能用笔芯一个个涂 选择 \(-6\ pts\) 判断 \(-3\ pts\) 回答问题的选择 \(-9\ pts\) 完成代码 \(-3\ pts\) \(79\ pts\) in total S 开始:艾,选择题真简单 后面:wc,为什么 LCA 要用笛卡尔树?! 选择题 \(-6\ pts\) 判断题 \(-7.5\ pts\) 回答问题的选择 \(-9\ pts\) 完成代…
最近做的一场比赛,把自己负责过的题目记一下好了. Problem B URAL 2013 Neither shaken nor stirred 题意:一个有向图,每个结点一个非负值,可以转移到其他结点.初始时刻从结点出发,然后每次到达一个结点询问上一个到达的正值结点的权值,离开结点时也要询问一下,因为当前结点可能为正数,答案就是这个值了,如果不存在这个样的正权值输出“sober",或者不明确时输出“unkonwn”. 分析:可以当做树形dp来做.dp[u][0]表示进入结点时上一个正权值,dp[…
题意:输入栈的大小,输出可能的出栈顺序的个数. 这道题,如果做了1022,那就只要在上面改改就行了, 第一想法是加上全排列-----结果是正确的,但是绝对会超时 验证性的实现了:(Time Limit Exceeded) import java.util.*; import java.io.*; public class Main{ public static void main(String[] arg){ Scanner scan = new Scanner(new BufferedInpu…
Webster defines prime as:prime (prim) n. [ME, fr. MF, fem. of prin first, L primus; akin to L prior] 1: first intime: original 2 a: having no factor except itself and one ⟨3 is a number⟩ b : havingno common factor except one ⟨12 and 25 are relatively…