poj: 1004】的更多相关文章

Financial Management POJ - 1004 解题思路:水题. #include <iostream> #include <cstdio> #include <iomanip> #include <cmath> using namespace std; int main() { double sum=0.0; double now=0.0; while(cin>>now){ sum+=now; ;i<;i++){ cin&…
1.题目描述: http://poj.org/problem?id=1004 2.解题过程 这个题目咋一看很简单,虽然最终要解出来的确也不难,但是还是稍微有些小把戏在里面,其中最大的把戏就是float 输入的精度问题,比如,一种最简单最直观的的解题方案如下: #include <stdlib.h> #include <stdio.h>   int main() { int sum = 0; float cb_this_month; for(int i=0;i<12;++i)…
1.链接地址: http://poj.org/problem?id=1004 http://bailian.openjudge.cn/practice/1004 2.题目: 总时间限制: 1000ms 内存限制: 65536kB 描述 Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decid…
Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 126087   Accepted: 55836 Description Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has deci…
简单题 #include <iostream> #include <stdio.h> #include <string.h> #include <stack> using namespace std; int main() { ]; ; ; i < ; ++i) { cin >> salary[i]; sum += salary[i]; } cout << << endl; ; }…
求平均数,记得之前在杭电oj上做过一个求平均数的题目,结果因为题目是英文的,我就懵逼了 #include <stdio.h> int main() { ; double num; int i; ; i < ; ++i) { scanf("%lf",&num); sum += num; } printf("$%.2f",sum/12.0); }…
一. 题目 Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 173910   Accepted: 65186 Description Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry ha…
大意是,从输入六个数 .第i个数代表价值为i的有几个,平均分给两个人 ,明摆着的背包问题,本来以为把他转化为01背包.可是TLe,后来发现是12万的平方还多,所以妥妥的TLE,后来发现这是一个全然背包问题.然后即纠结了 ,没学过啊 .最后发现思想好i是蛮简单的,水水的A掉了.最后注意一下初始化问题和输入问题后就好了 #include <stdio.h> #include <string.h> int a[10]; int dp[120005]; int maxx(int a,int…
参考:https://www.cnblogs.com/BTMaster/p/3525008.html #include <iostream> #include <cstdio> #include <cstring> using namespace std; int main() { float a,sum; while (cin>>a)//要注意格式,能从文件读入多组数据! { sum=a; ;i<;i++) { cin>>a; sum+=…
Financial Management Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 165062   Accepted: 61316 Description Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has deci…