qut训练题解-2016-9-4个人赛】的更多相关文章

题目链接:http://acm.hust.edu.cn/vjudge/contest/131124#overview 贴了链接这里就不上原题的描述了. A: B: 分析:这里用到简单的拓扑排序的算法.这里你会发现它给出的胜负关系不是线性的,无法用一个线性表存储,因此这里自然想到构图.然后用到拓扑排序的原理,我们建立有向图,用v1 —>v2表示v2战胜了v1,那么在建图完成之后,这个图中入度为0的点就是最后一名,因为它没有战胜任何人.如果当前图入度为0的点有多个,就按照题目要求将小数放在前面.然后…
随着评讲的进行代码和题解会逐步放上来 2018天梯赛第一次训练 1001 : 进制转换 Time Limit(Common/Java):1000MS/10000MS     Memory Limit:65536KByteTotal Submit: 78            Accepted: 42 Description 输入一个十进制数N,将它转换成R进制数输出. Input 输入数据包含多个测试实例,每个测试实例包含两个整数N(32位整数)和R(2<=R<=16) Output 为每个测…
题目背景 Lj的朋友WKY是一名神奇的少年,在同龄人之中有着极高的地位... 题目描述 他的老师老王对他的程序水平赞叹不已,于是下决心培养这名小子. 老王的训练方式很奇怪,他会一口气让WKY做很多道题, 要求他在规定的时间完成. 而老王为了让自己的威信提高,自己也会把这些题都做一遍. WKY和老王都有一个水平值,他们水平值的比值和做这些题 所用时间的比值成反比.比如如果WKY的水平值是1,老王的水平值是2 那么WKY做同一道题的时间就是老王的2倍. 每个题目有他所属的知识点,这我们都知道, 比如…
第一次就去拉了点思维很神奇的CF题目 2018省赛赛第一次训练 # Origin Title     A CodeForces 607A Chain Reaction     B CodeForces 385C Bear and Prime Numbers     C CodeForces 670D2 Magic Powder - 2     D CodeForces 360B Levko and Array     E CodeForces 68B Energy exchange     F…
Runtime Error   Bahosain was trying to solve this simple problem, but he got a Runtime Error on one of the test cases, can you help him by solving it? Given an array of N non-negative integers and an integer K, your task is to find two integers X and…
Heavy Coins   Bahosain has a lot of coins in his pocket. These coins are really heavy, so he always tries to get rid of some of the coins by using them when paying for the  taxi. Whenever Bahosain has to pay S pennies for the taxi driver, he tries to…
Travelling Salesman   After leaving Yemen, Bahosain now works as a salesman in Jordan. He spends most of his time travelling between different cities. He decided to buy a new car to help him in his job, but he has to decide about the capacity of the…
Epic Professor   Dr. Bahosain works as a professor of Computer Science at HU (Hadramout    University). After grading his programming exam, he noticed that most of the students have failed. Since this is the last semester for him teaching in Yemen, D…
Street Lamps   Bahosain is walking in a street of N blocks. Each block is either empty or has one lamp. If there is a lamp in a block, it will light it’s block and the direct adjacent blocks. For example, if there is a lamp at block 3, it will light…
Rock-Paper-Scissors   Rock-Paper-Scissors is a two-player game, where each player chooses one of Rock, Paper, or Scissors. Here are the three cases in which a player gets one  point: ­          Choosing Rock wins over a player choosing  scissors. ­  …