描述
传送门:poj-1330
A rooted tree is a well-known data structure in computer science and engineering. An example is shown below:
learn,explore,create.
传送门:poj-1330
A rooted tree is a well-known data structure in computer science and engineering. An example is shown below:
传送门:hdu-1269
为了训练小希的方向感,Gardon建立了一座大城堡,里面有N个房间(N<=10000)和M条通道(M<=100000),每个通道都是单向的,就是说若称某通道连通了A房间和B房间,只说明可以通过这个通道由A房间到达B房间,但并不说明通过它可以由B房间到达A房间。Gardon需要请你写个程序确认一下是否任意两个房间都是相互连通的,即:对于任意的i和j,至少存在一条路径可以从房间i到房间j,也存在一条路径可以从房间j到房间i。
传送门:2018”百度之星”程序设计大赛 - 资格赛1006
度度熊有一张 $n$ 个点 $m$ 条边的无向图,所有点按照 $1,2,⋯,n$ 标号,每条边有一个正整数权值以及一种色光三原色红、绿、蓝之一的颜色。
现在度度熊想选出恰好 $k$ 条边,满足只用这 $k$ 条边之中的红色边和绿色边就能使 n 个点之间两两连通,或者只用这 $k$ 条边之中的蓝色边和绿色边就能使 $n$ 个点之间两两连通,这里两个点连通是指从一个点出发沿着边可以走到另一个点。
对于每个 $k=1,2,⋯,m$,你都需要帮度度熊计算选出恰好 $k$ 条满足条件的边的权值之和的最小值。
传送门:2018”百度之星”程序设计大赛 - 资格赛1001
度度熊为了完成毕业论文,需要收集一些数据来支撑他的论据,于是设计了一份包含 $m$ 个问题的调查问卷,每个问题只有 ‘A’ 和 ‘B’ 两种选项。
将问卷散发出去之后,度度熊收到了 $n$ 份互不相同的问卷,在整理结果的时候,他发现可以只保留其中的一部分问题,使得这 $n$ 份问卷仍然是互不相同的。这里认为两张问卷是不同的,当且仅当存在至少一个被保留的问题在这两份问卷中的回答不同。
现在度度熊想知道,存在多少个问题集合,使得这 n 份问卷在只保留这个集合的问题之后至少有 $k$ 对问卷是不同的。
传送门:swustoj-24
又是这道题,请不要惊讶,也许你已经见过了,那就请你再来做一遍吧。这可是wolf最骄傲的题目哦。在笛卡尔坐标系正半轴(x>=0,y>=0)上有n个点,给出了这些点的横坐标和纵坐标,但麻烦的是这些点的坐标没有配对好,你的任务就是将这n个点的横坐标和纵坐标配对好,使得这n个点与x轴围成的面积最大。
The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.
- It is a matter of security to change such things every now and then, to keep the enemy in the dark.
- But look, I have chosen my number 1033 for good reasons. I am the Prime minister, you know!
- I know, so therefore your new number 8179 is also a prime. You will just have to paste four new digits over the four old ones on your office door.
- No, it’s not that simple. Suppose that I change the first digit to an 8, then the number will read 8033 which is not a prime!
- I see, being the prime minister you cannot stand having a non-prime number on your door even for a few seconds.
- Correct! So I must invent a scheme for going from 1033 to 8179 by a path of prime numbers where only one digit is changed from one prime to the next prime.
传送门:poj-1850
Transmitting and memorizing information is a task that requires different coding systems for the best use of the available space. A well known system is that one where a number is associated to a character sequence. It is considered that the words are made only of small characters of the English alphabet a,b,c, …, z (26 characters). From all these words we consider only those whose letters are in lexigraphical order (each character is smaller than the next character).
传送门:poj-2528
一样的题:swustoj-764(校门外的树 Plus Plus)
The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has finally decided to build an electoral wall for placing the posters and introduce the following rules:
- Every candidate can place exactly one poster on the wall.
- All posters are of the same height equal to the height of the wall; the width of a poster can be any integer number of bytes (byte is the unit of length in Bytetown).
- The wall is divided into segments and the width of each segment is one byte.
- Each poster must completely cover a contiguous number of wall segments.
传送门:hdu-3440
In Fuzhou, there is a crazy super man. He can’t fly, but he could jump from housetop to housetop. Today he plans to use $N$ houses to hone his house hopping skills. He will start at the shortest house and make $N$-1 jumps, with each jump taking him to a taller house than the one he is jumping from. When finished, he will have been on every house exactly once, traversing them in increasing order of height, and ending up on the tallest house.