贪心与数论
文章平均质量分 80
贪心是完美的数论
MastErXZ-∞
XZIT ACMer XL
展开
-
洛谷P2660 zzc 种田——正方形分割
题目背景可能以后 zzc就去种田了。题目描述田地是一个巨大的矩形,然而zzc 每次只能种一个正方形,而每种一个正方形时zzc所花的体力值是正方形的周长,种过的田不可以再种,zzc很懒还要节约体力去泡妹子,想花最少的体力值去种完这块田地,问最小体力值输入格式两个正整数x,y,表示田地的长和宽输出格式输出最小体力值输入输出样例输入 #1复制1 10输出 #1复制40输入 #2复制2 2 输出 #2复制8说明/提示1<=x,y&原创 2021-07-10 23:45:44 · 481 阅读 · 0 评论 -
UPC Contest2838 - 2021个人训练赛第19场
问题 A: ABC Swap时间限制:1Sec内存限制:128 MB题目描述We have three boxes A, B, and C, each of which contains an integer.Currently, the boxes A, B, and C contain the integers X, Y, and Z, respectively.We will now do the operations below in order. Find the con...原创 2021-06-12 00:26:30 · 212 阅读 · 0 评论 -
UPC Contest2833 - 2021个人训练赛第17场
问题 A: The Number of Even Pairs时间限制:1Sec内存限制:128 MB提交状态题目描述We have N+M balls, each of which has an integer written on it.It is known that:The numbers written on N of the balls are even.The numbers written on M of the balls are odd.Find the n...原创 2021-06-05 23:31:59 · 231 阅读 · 0 评论 -
UPC Contest2824 - 2021个人训练赛第13场
问题 A: Rotate时间限制:1Sec内存限制:128 MB题目描述Given is a string S of length 3.Move the first character of S to the end of S and print the resulting string S′.ConstraintsS is a string of length 3 consisting of lowercase English letters.输入Input is gi...原创 2021-05-24 22:52:44 · 264 阅读 · 0 评论