
水题
Janwo
这个作者很懒,什么都没留下…
展开
-
CF #433 DIV2 B. Maxim Buys an Apartment
B. Maxim Buys an Apartmenttime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputMaxim wants to buy an apartment i原创 2017-09-07 12:58:39 · 284 阅读 · 0 评论 -
1058. A+B in Hogwarts (20)
1058. A+B in Hogwarts (20)时间限制50 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIf you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explaine...原创 2018-03-12 18:43:44 · 101 阅读 · 0 评论 -
蓝桥杯 海盗比酒量
海盗比酒量有一群海盗(不多于20人),在船上比拼酒量。过程如下:打开一瓶酒,所有在场的人平分喝下,有几个人倒下了。再打开一瓶酒平分,又有倒下的,再次重复...... 直到开了第4瓶酒,坐着的已经所剩无几,海盗船长也在其中。当第4瓶酒平分喝下后,大家都倒下了。等船长醒来,发现海盗船搁浅了。他在航海日志中写到:“......昨天,我正好喝了一瓶.......奉劝大家,开船不喝酒,喝酒别开船.........原创 2018-03-22 20:51:56 · 504 阅读 · 2 评论 -
CF 805A FAKE NP
A. Fake NPtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputTavak and Seyyed are good friends. Seyyed is very funny and he told Tavak to solve the fo...原创 2018-03-13 15:24:46 · 182 阅读 · 0 评论 -
Codeforces 706B 二分裸题
B. Interesting drinktime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasiliy likes to rest after a hard work, so you may often meet him in some bar...原创 2018-03-13 17:47:57 · 530 阅读 · 0 评论 -
51nod 1083矩阵取数问题
一个N*N矩阵中有不同的正整数,经过这个格子,就能获得相应价值的奖励,从左上走到右下,只能向下向右走,求能够获得的最大价值。例如:3 * 3的方格。1 3 32 1 32 2 1能够获得的最大价值为:11。Input第1行:N,N为矩阵的大小。(2 <= N <= 500) 第2 - N + 1行:每行N个数,中间用空格隔开,对应格子中奖励的价值。(1 <= Nii <= ...原创 2018-03-13 19:43:48 · 181 阅读 · 0 评论 -
51nod 1002数塔取数问题
一个高度为N的由正整数组成的三角形,从上走到下,求经过的数字和的最大值。每次只能走到下一层相邻的数上,例如从第3层的6向下走,只能走到第4层的2或9上。 5 8 4 3 6 97 2 9 5例子中的最优方案是:5 + 8 + 6 + 9 = 28Input第1行:N,N为数塔的高度。(2 <= N <= 500) 第2 - N + 1行:每行包括1层数塔的数字,第2行1个数,第3...原创 2018-03-13 19:45:16 · 177 阅读 · 0 评论 -
最佳分解问题
题目设n是一个正整数,现在要求将n分解为若干个互不相同的自然数的和,使这些自然数的乘积最大。 输入 10 输出 30#include<bits/stdc++.h>using namespace std;int num[1000],index=1;int solve(int n){ if(n==1) return 1; int tep=2; num[index...原创 2018-11-30 20:14:53 · 973 阅读 · 0 评论