- 博客(13)
- 收藏
- 关注
原创 Codeforces 115E Unambiguous Arithmetic Expression
D. Unambiguous Arithmetic Expressiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define an unambi
2017-10-22 21:41:34 349
原创 Codeforces 609E Minimum spanning tree for each edge
E. Minimum spanning tree for each edgetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputConnected undirected
2017-10-22 21:21:56 392
原创 Codeforces 101490E Charles in Charge
题目链接戳这里。题目大意:某电动车的价格与电池大小成正比,因为电动车只能在城市里充电,所以会造成绕路的情况导致回家变慢。此人要求自己回家的时间要在原来不换电动车(可以跑最短路)的情况下最多增加X%,求电池的最小容量即走的路径上的最长边权。思路:二分+dij不解释。。难得一见的水题,尽管dij还是wa了一次。#include#include#include#incl
2017-10-07 20:50:28 382
原创 Atcoder ARC061 E Snuke's Subway Trip
E - すぬけ君の地下鉄旅行 / Snuke's Subway TripTime limit : 3sec / Memory limit : 256MBScore : 600 pointsProblem StatementSnuke's town has a subway system, consisting of N stations and M ra
2017-10-07 20:06:39 916
原创 AtCoder 2688 Young Maids
E - Young MaidsTime limit : 2sec / Memory limit : 256MBScore : 800 pointsProblem StatementLet N be a positive even number.We have a permutation of (1,2,…,N), p=(p1,p2,…,pN).
2017-10-07 11:59:05 309
原创 Codeforces 555C Case of Chocolate
C. Case of Chocolatetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrewid the Android is a galaxy-known
2017-10-07 11:43:51 318
原创 Codeforces Gym 100202C Holidays
Gym的题面全是PDF不好复制。。。原题链接戳这里。题目大意:若干年后,考古学家发现了一堆关于假日的记载,这些记载只有月日,没有年份。记载了假日的取消和颁布。这些记载是按照时间顺序给出的,同一天里只能颁布一条法令。给定一个时间范围,问如何安排记载发布的年份,使得在这个范围中假日的时间最长。思路:求时间最长,一看就是一个DP,我们令f[i][j]表示处理完前i个记载,最后一个记载发布
2017-10-05 10:52:31 341
原创 AtCoder 2370 Piling
D - Piling UpTime limit : 2sec / Memory limit : 256MBScore : 900 pointsProblem StatementJoisino has a lot of red and blue bricks and a large box. She will build a tower of these bric
2017-10-03 20:50:37 273
原创 Timus OJ 1696(URAL) Salary for Robots
1696. Salary for RobotsTime limit: 2.0 secondMemory limit: 64 MBThere are n robots on planet PTZZZ. Each robot has its own unique rank—an integer from 1 to n, and should execute all orde
2017-10-02 20:27:53 489
原创 Codeforces Gym 100753J Souvenirs
题目链接戳这里。题目大意:你出去旅游,该国家只有金币和银币两种货币,金币和银币有一个汇率,这里的商人的找零方式是把银币分为一袋子一袋子,他只能一袋子一袋子的找零,商人分为三种,傻帽:包数按照上取整,诚实的人:包数按照四舍五入,坏人:包数按照下取整找钱。你在买傻帽的东西的时候只能用银币买。现在你有一定数量的金币,一些商人,你只能按顺序遍历这些商人,问最多能买多少物品。思路:一
2017-10-02 17:10:42 349
原创 Codeforces Gym 101485D Debugging
题目不好复制,看这里:点击打开链接题目大意:你有一个N行的代码,你可以花费p时间写一行printf语句,也可以花费r时间调试,问用多少时间最少可以查出错误在哪里。(写出printf语句可以看出printf之前的程序部分有没有错误)。思路:可以列出递推式:f(n)=min{k*p+f(floor(n/k+1)+r。不难看出,我们枚举k的时候,会有很多冗余的操作,因为上取整的时候n除以一段连续
2017-10-01 20:47:21 343
原创 Codeforces 571B Minimization
B. Minimizationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got array A, consisting of n integer
2017-10-01 20:33:03 230
原创 Codeforces Gym 101164I Cubes
Problem ICubesInput File: I.inOutput File: standard outputTime Limit: 0.5 seconds (C/C++)Memory Limit: 256 megabytesWrite a program that takes a natural number N and decomposes it as a
2017-10-01 20:16:11 304
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人