
OJ水题
文章平均质量分 64
bestsort
这个作者很懒,什么都没留下…
展开
-
codeforces Supermarket(水题,贪心)
A. Supermarkettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe often go to supermarkets to buy some frui原创 2018-01-31 22:41:41 · 540 阅读 · 0 评论 -
codeforces Perfect Number(暴力)
B. Perfect Numbertime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe consider a positive integer perfect, if and only if the sum of its digits is e...原创 2018-01-31 22:48:16 · 352 阅读 · 0 评论 -
山东省第四届ACM程序设计竞赛A题:Rescue The Princess(向量旋转)
A - Problem A:Rescue The PrincessTime Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %lluSubmit Status use MathJax to parse formulasDescriptionSeveral days ago, a beast caught a...原创 2018-03-15 20:12:24 · 199 阅读 · 0 评论 -
牛客Wannafly挑战赛10 A.小H和迷宫
链接:https://www.nowcoder.com/acm/contest/72/A来源:牛客网题目描述 小H陷入了一个迷宫中,迷宫里有一个可怕的怪兽,血量有N点,小H有三瓶魔法药水,分别可以使怪兽损失a%、b%、c%的血量(之后怪兽的血量会向下取整),小H想合理地运用这三瓶药水,使怪兽失去尽可能多的血量 注意:每瓶药水只能用一次输入描述:一行,四个整数 N,a,b,c...原创 2018-02-23 21:49:23 · 494 阅读 · 0 评论 -
USACO1.4.3 Arithmetic Progressions 等差数列 解题报告(枚举)
Description一个等差数列是一个能表示成a, a+b, a+2b,..., a+nb (n=0,1,2,3,...)的数列。 在这个问题中a是一个非负的整数,b是正整数。写一个程序来找出在双平方数集合(双平方数集合是所有能表示成p^2+q^2的数的集合)S中长度为n的等差数列。Input第一行: N(3<= N<=25),要找的等差数列的长度。 第二行: M(1&l...原创 2018-09-14 20:11:25 · 775 阅读 · 0 评论 -
USACO1.3.4 Prime Cryptarithm 牛式 解题报告(模拟)
Description 下面是一个乘法竖式,如果用我们给定的那n个数字来取代*,可以使式子成立的话,我们就叫这个式子牛式。 * * * x * * ------- * * * * * * ------- * * * *数字只能取代*,当然第一位不能为0,况且给定的数字里不包括0。注意一下在美国的学校中教的“部...原创 2018-09-15 15:19:50 · 732 阅读 · 0 评论