上一页 1 2 3 4 5 6 7 8 9 10 ··· 30 下一页
摘要: 题目不严谨啊啊啊啊式子算出来结果是37.975样例输出的是37.98我以为是四舍五入的啊啊啊,所以最后输出的是sum+0.005结果告诉我全部错误啊结果直接保留两位小数就可以了啊啊啊啊 水题也不要这么坑人啊啊啊啊 #include <iostream> #include <algorithm> #i 阅读全文
posted @ 2017-04-18 15:13 辰曦~文若 阅读(282) 评论(0) 推荐(0) 编辑
摘要: 题意:给出n1和n2,以及其中一个数的进制,问另一个数是多少进制的情况下,才会是两个数相等。不存在的话,则输出Impossible 这题思路很简单,但是要考虑的比较多,在简单题里面算是比较好的。 有两个注意点1.我被题目给骗了!!!以为最大进制只可能是36,所以在程序里就枚举2~36的进制,导致错了 阅读全文
posted @ 2017-04-18 15:11 辰曦~文若 阅读(870) 评论(2) 推荐(0) 编辑
摘要: 多项式相乘 注意相乘结果的多项式要开两倍的大小!!! #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string.h> using namespace std; //两个 阅读全文
posted @ 2017-04-18 15:07 辰曦~文若 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 如题。。。 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string.h> using namespace std; //太水了好吧。。。 int n; int tim 阅读全文
posted @ 2017-04-18 15:05 辰曦~文若 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 题意:给出n个数,求最大连续的子区间和,并且输出该区间的第一个和最后一个数。 如果所有数都小于0,那么则输出0,第一个数和最后一个数。 看数据k的范围,就知道肯定不能两层for循环来求区间和,O(n^2)的复杂度肯定超时所以这里肯定要求一遍for循环就能知道结果定义区间l和r,sum为目前[l,r] 阅读全文
posted @ 2017-04-18 15:01 辰曦~文若 阅读(461) 评论(0) 推荐(1) 编辑
摘要: 判断哪个人最早到,哪个人最晚走水,就是找最大值最小值 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <string.h> using namespace std; int 阅读全文
posted @ 2017-04-18 14:59 辰曦~文若 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 把每个位上的数字求和sum,然后以英文单词的形式输出sum的每个位 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <vector> using namespace std; 阅读全文
posted @ 2017-04-18 14:57 辰曦~文若 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 统计每层的叶子节点个数建树,然后dfs即可 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> #include <vector> using namespace std; /* 统计每层的叶子节 阅读全文
posted @ 2017-04-18 14:56 辰曦~文若 阅读(424) 评论(0) 推荐(0) 编辑
摘要: 注意两点:1.系数也有可能加起来为负!!!一开始我if里面判断为>0导致有样例没过。。。2.如果最后所有指数的系数都为0,输出一个0即可,原本以为是输出 1 0 0.0。。。 #include <iostream> #include <cstdio> #include <algorithm> #in 阅读全文
posted @ 2017-04-18 14:53 辰曦~文若 阅读(591) 评论(0) 推荐(0) 编辑
摘要: 计算A+B的和,并且按标准格式处理,每3个就要有个逗号 #include <iostream> #include <cstdio> #include <algorithm> #include <cstring> using namespace std; int main() { int a,b; s 阅读全文
posted @ 2017-04-18 14:51 辰曦~文若 阅读(948) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 30 下一页