hitoj
我说的是那个谁
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
[HIT]1003 - Mixing Milk:动态数组vector
题目:HIT Online Judge 解法:根据farmer所给单价进行排序,每次选择单价最低的购买全部,直到购买总数量达到要求。 最后一个只购买所需量即(m-ca)。 #include <stdio.h> #include <vector> using namespace std; int main() { int n=0,m=0; int ca=0,money=0; scanf("%d %d",&m,&n); vecto原创 2021-12-19 00:23:11 · 143 阅读 · 0 评论 -
[HIT]1002 - A+B+C:32位机上int的表示范围
Problem Description For each pair of integers A B and C ( -2^31 <= A, B, C<= 2^31-1 ), Output the result of A+B+C on a single line. 注意: 一、32位机上int占4字节,即32位,其表示方式为补码,其表示范围为-2^31 <= X<= 2^31-1 如:设int占1字节,即四位时--在 最大:[0111] ...原创 2021-12-18 18:25:22 · 360 阅读 · 1 评论 -
[HIT]1001 - A+B:scanf函数返回值
scanf 函数的返回值反映的是按照指定的格式符正确读入的数据的个数 例子: 1001-A+B Problem Description for each pair of integers A and B ( 0 <= A,B <= 10) , Output the result of A+B on a single line. #include <stdio.h> using namespace std; int main() { int a,b; ..原创 2021-12-18 17:38:39 · 133 阅读 · 0 评论
分享