新手
小混混啊
这个作者很懒,什么都没留下…
展开
-
GZHU18级第一次周赛Problem D
问题:给定三条边,请你判断一下能不能组成一个三角形。 Input 输入数据第一行包含一个数M,接下有M行,每行一个实例,包含三个正数A,B,C。其中A,B,C <1000; Output 对于每个测试实例,如果三条边长A,B,C能组成三角形的话,输出YES,否则NO。 Sample Input 2 1 2 3 2 2 2 Sample Output NO YES 解决思路:输入三角形的三条边...原创 2018-12-09 09:24:08 · 167 阅读 · 0 评论 -
GZHU18级第一次周赛Problem A
问题:One hot summer day Pete and his friend Billy decided to buy a watermelon. They chose the biggest and the ripest one, in their opinion. After that the watermelon was weighed, and the scales showed w...原创 2018-12-09 09:38:14 · 162 阅读 · 0 评论 -
acm2
实验思路: 定义int 类型n,p,q,o.以n来储存房间数量,p来储存房间已住人数,q来储存房间容量,o为符合要求的房间数。首先输入房间数,然后用for循环来实现对q和p的输入,若满足条件,o则加1,直到n为0时,退出循环。然后输出符合要求的房间数。 #include<iostream> using namespace std; int main() { int n, p, q, ...原创 2018-12-06 19:36:13 · 1449 阅读 · 0 评论