随笔分类 -  贪心

摘要:Office Keystime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n people and k keys on a straight line. Every person wants to get to the offi... 阅读全文
posted @ 2017-08-18 19:30 Pic 阅读(173) 评论(0) 推荐(0)
摘要:B. Color the Fence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Igor has fallen in love with Tanya. Now Igor wants to show his feelings... 阅读全文
posted @ 2017-03-18 17:11 Pic 阅读(273) 评论(0) 推荐(0)
摘要:Time Limit:1000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description You are given a sequence of positive integers x1, x2, ..., xn and two non-negative integers a and b. Your ... 阅读全文
posted @ 2017-03-16 17:07 Pic 阅读(272) 评论(0) 推荐(0)
摘要:B. Fixed Points time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A permutation of length n is an integer sequence such that each integer fr... 阅读全文
posted @ 2017-03-15 21:50 Pic 阅读(189) 评论(0) 推荐(0)
摘要:Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description You want to arrange n integers a1, a2, ..., an in some order in a row. Let's define the value of an arrangemen... 阅读全文
posted @ 2017-03-15 21:48 Pic 阅读(137) 评论(0) 推荐(0)
摘要:Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/131072 K (Java/Others) 问题描述Lotus有nn种字母,给出每种字母的价值以及每种字母的个数限制,她想构造一个任意长度的串。 定义串的价值为:第1位字母的价值*1+第2位字母的价值*2+第3位字母的价值*3…… 求Lotus能构造出的串的最大价值。(可以... 阅读全文
posted @ 2017-01-21 22:27 Pic 阅读(187) 评论(0) 推荐(0)
摘要:time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s, consisting of lowercas 阅读全文
posted @ 2016-10-09 12:37 Pic 阅读(152) 评论(0) 推荐(0)