2019 ICPC Universidad Nacional de Colombia Programming Contest

https://codeforc.es/gym/102307

最后5题收尾了,大概率铜。其中有2题是签到手速题。有一题是抄模板的表达式求值,写一个分数类随便过。

比较有趣的是下面的:

G. Graduation

题意:一共有n门课,每门课有至多1门先修课,没有先修课的用0表示。学习一门课的条件是:这个学期选的课不足k门,且这门课的先修课(假如有的话)已经在前面的学期中学过了。求最少需要多少个学期学完。

思路:队友一开始是优先拓展儿子数最多的子结点,我觉得怪怪的,比如一个像蒲公英一样的东西,一开始在周围的大子树浪费时间而不去走茎的话,可能导致最后每个学期只学1门课。

lzf非常厉害不久就想出一个方法。优先判断剩余深度,相同剩余深度的优先拓展儿子数最多的。这个感觉不错。越想越真。随便写一个就草过去了。

原文地址:https://www.cnblogs.com/Inko/p/11437649.html

时间: 2024-08-30 18:18:40

2019 ICPC Universidad Nacional de Colombia Programming Contest的相关文章

The 2019 Aisa Nanchang First Round Online Programming Contest ——H

思路:矩阵快速幂+map 代码: #include<cmath> #include<algorithm> #include<cstdio> #include<map> const int INF=0x3f3f3f3f; const int maxn = 1e7+10; const int mod=998244353; using namespace std; typedef long long ll; map<ll,ll> mp; ll n; s

Fire-Fighting Hero (The 2019 Asia Nanchang First Round Online Programming Contest)

This is an era of team success, but also an era of heroes. Throughout the ages, there have been numerous examples of using the few to defeat the many. There are VV(Numbers 11 to VV) fire-fighting points in ACM city. These fire-fighting points have EE

Pangu Separates Heaven and Earth(签到题)(The 2019 Asia Nanchang First Round Online Programming Contest)

Long long ago, the sky and the earth were not separated, and the universe was chaotic. There was a giant named Pangu who slept for eighteen thousand years in this chaos. One day, Pangu woke up suddenly. When he saw the darkness around him, he took up

H. The Nth Item(The 2019 Asia Nanchang First Round Online Programming Contest)

题意:https://nanti.jisuanke.com/t/41355 给出N1,计算公式:A=F(N)Ni=Ni-1 ^ (A*A),F为类斐波那契需要矩阵快速幂的递推式. 求第k个N. 思路: 发现从大约1e5个数开始N交替出现,到一定位置%2即可.(or正解:https://blog.csdn.net/qq_41848675/article/details/100667808   or https://blog.csdn.net/jk_chen_acmer/article/detail

The 2019 Asia Nanchang First Round Online Programming Contest E. Magic Master

题目链接:https://nanti.jisuanke.com/t/41352 题目意思还是好理解的,看过的人不多,感觉是被通过量吓到了.其实就是个水题,反向模拟就好了, 用队列模拟,反向模拟,它要放m张卡到后面,那我就放m张卡到前面,一开始队列只有1张卡,慢慢加到n张卡, 先加大的卡,再一直到1的卡.对了,可能会出现只有5张卡,m却是6,7,8或9,10,那么为了减少不必要的模拟, 用mod来减少,因为有些模拟会让卡和之前比较,算是原封不动. 1 #include <iostream> 2

The 2019 Asia Nanchang First Round Online Programming Contest The Nth Item

The Nth Item 思路: 先用特征根法求出通向公式,然后通向公式中出现了\(\sqrt{17}\),这个可以用二次剩余求出来,然后可以O(\(log(n)\))求出. 但是还不够,我们先对\(n\)欧拉降幂,然后求base为\(\sqrt{1e9}\)的快速幂,预处理一些东西,就可以类似O(1)求出了. 代码: #pragma GCC optimize(2) #pragma GCC optimize(3) #pragma GCC optimize(4) #include<bits/std

2019 ICPC 南昌网络赛

2019 ICPC 南昌网络赛 比赛时间:2019.9.8 比赛链接:The 2019 Asia Nanchang First Round Online Programming Contest 总结 // 史上排名最高一次,开场不到两小时队友各A一题加水题共四题,排名瞬间升至三四十名 // 然后后三小时就自闭了,一题都没有突破...最后排名211 hhhh ? ? B. Fire-Fighting Hero 题意 队友做的,待补. ? AC代码 #include<cstdio> #includ

[AtCoder] NIKKEI Programming Contest 2019 (暂缺F)

[AtCoder] NIKKEI Programming Contest 2019 ??本来看见这一场的排名的画风比较正常就来补一下题,但是完全没有发现后两题的AC人数远少于我补的上一份AtCoder. A - Subscribers ??首先始终 \(max = \min(A, B)\) ,\(min\) 的话如果 \(A + B \leq N\) ,那么就是 \(0\) ,否则就是 \(A + B - N\) . int n, a, b; int main() { read(n), read

【AtCoder】diverta 2019 Programming Contest

diverta 2019 Programming Contest 因为评测机的缘故--它unrated了.. A - Consecutive Integers #include <bits/stdc++.h> #define fi first #define se second #define pii pair<int,int> #define mp make_pair #define pb push_back #define space putchar(' ') #define