2020寒假训练
本人2020寒假集训题目
楚仙子
我只是想学算法
展开
-
Magic Potion
题目There are n heroes and m monsters living in an island. The monsters became very vicious these days, so the heroes decided to diminish the monsters in the island. However, the iii-th hero can only k...原创 2020-01-18 20:37:36 · 287 阅读 · 0 评论 -
3-idiots
题目King OMeGa catched three men who had been streaking in the street. Looking as idiots though, the three men insisted that it was a kind of performance art, and begged the king to free them. Out of h...原创 2020-01-13 20:52:03 · 498 阅读 · 1 评论 -
A+B Problem
题目Given N integers in the range [−50000,50000], how many ways are there to pick three integers ai, aj, ak, such that i, j, k are pairwise distinct and ai+aj=ak? Two ways are different if their ordere...原创 2020-01-13 20:43:28 · 246 阅读 · 0 评论 -
A * B Problem Plus
题目Calculate A * B.InputEach line will contain two integers A and B. Process to end of file.Note: the length of each integer will not exceed 50000.OutputFor each case, output A * B in one line.S...原创 2020-01-13 20:32:17 · 249 阅读 · 0 评论 -
The GCD of Fibonacci Numbers
题目The Fibonacci sequence is the sequence of numbers such that every element is equal to the sum of the two previous elements, except for the first two elements f0 and f1 which are respectively zero a...原创 2020-01-12 20:54:56 · 210 阅读 · 0 评论 -
Dominant Indices
题目You are given a rooted undirected tree consisting of n vertices. Vertex 1 is the root.Let’s denote a depth array of vertex x as an infinite sequence [dx,0,dx,1,dx,2,…], where dx,i is the number of...原创 2020-01-12 16:09:14 · 205 阅读 · 0 评论 -
Lomsat gelral
题目You are given a rooted tree with root in vertex 1. Each vertex is coloured in some colour.Let’s call colour c dominating in the subtree of vertex v if there are no other colours that appear in the...原创 2020-01-12 16:03:07 · 121 阅读 · 0 评论 -
数据分割
题目小w来到百度之星的赛场上,准备开始实现一个程序自动分析系统。这个程序接受一些形如xi=xj 或 xi≠xj 的相等/不等约束条件作为输入,判定是否可以通过给每个 w 赋适当的值,来满足这些条件。输入包含多组数据。然而粗心的小w不幸地把每组数据之间的分隔符删掉了。他只知道每组数据都是不可满足的,且若把每组数据的最后一个约束条件去掉,则该组数据是可满足的。请帮助他恢复这些分隔符。In...原创 2020-01-12 11:35:39 · 474 阅读 · 0 评论 -
Monkey King
题目Once in a forest, there lived N aggressive monkeys. At the beginning, they each does things in its own way and none of them knows each other. But monkeys can’t avoid quarrelling, and it only happen...原创 2020-01-12 10:59:31 · 289 阅读 · 0 评论 -
[BZOJ2809]dispatching
题目在一个忍者的帮派里,一些忍者们被选中派遣给顾客,然后依据自己的工作获取报偿。在这个帮派里,有一名忍者被称之为 Master。除了 Master以外,每名忍者都有且仅有一个上级。为保密,同时增强忍者们的领导力,所有与他们工作相关的指令总是由上级发送给他的直接下属,而不允许通过其他的方式发送。现在你要招募一批忍者,并把它们派遣给顾客。你需要为每个被派遣的忍者 支付一定的薪水,同时使得支付的薪水...原创 2020-01-11 19:54:18 · 290 阅读 · 0 评论