You're investigating what happened when one of your computer systems recently broke down. So far you've concluded that the system was overloaded; it looks like it couldn't handle the hailstorm of incoming requests. Since the incident, you have had am…
Method ringing is used to ring bells in churches, particularly in England. Suppose there are 6 bells that have 6 different pitches. We assign the number 1 to the bell highest in pitch, 2 to the second highest, and so on. When the 6 bells are rung in…
In an unprecedented turn of events, goblins recently launched an invasion against the Nedewsian city of Mlohkcots. Goblins—small, green critters—love nothing more than to introduce additional entropy into the calm and ordered lives of ordinary people…
Ada, Bertrand and Charles often argue over which TV shows to watch, and to avoid some of their fights they have finally decided to buy a video tape recorder. This fabulous, new device can record kk different TV shows simultaneously, and whenever a sh…
A:Adjoin the Networks One day your boss explains to you that he has a bunch of computer networks that are currently unreachable from each other, and he asks you, the cable expert's assistant, to adjoin the networks to each other using new cables. Exi…
layout: post title: 2018-2019 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2018) author: "luowentaoaa" catalog: true tags: mathjax: true - codeforces 传送门 付队! B.Baby Bites (签到模拟) 按照题意模拟就行了 int a[maxn]; string s; int main() { std::ios::syn…
// Change of Scenery 1 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <vector> #include <utility> #include <queue> using namespace std; typedef long long ll; typedef pair<…
2017-2018 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2017) 今日份的训练,题目难度4颗星,心态被打崩了,会的算法太少了,知道要用什么写,但是写不出来啊(抱头痛哭)和猪队友一共写出来3道题,本来I题应该可以写出来的,有向图求最小环输出路径就可以,But,没有板子啊!!!(。•́︿•̀。) 赛后补题,补一下I(单独写),D题和E题表示读不懂题,不知道要干嘛,D题是bfs+位运算 ,E题是bfs+优先队列,题意都读不懂,题解…
2018-2019 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2018)- D. Delivery Delays -二分+最短路+枚举 [Problem Description] 一座城市为无向图带权图,一号节点为披萨餐厅的位置,有\(k\)个人定披萨,按时间先后顺序给出定披萨的时间\(s_i\),地点\(u_i\)以及这个人的披萨在哪个时间做好\(t_i\).问在所有配送方案中,所有人的等待时间的最大值最小是多少?配送顺序完全按照…
2018-2019 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2018)-E. Explosion Exploit-概率+状压dp [Problem Description] 我方有\(n\)个人,对方有\(m\)个人,每个人都有一个健康值\(h_i\),有\(d\)次攻击,每次随机从所有人中选\(1\)个人,减少其\(1\)健康值.问将对方所有人都消灭的概率是多少? [Solution] 方法\(1\): ​ 将所有人的健康值作为…