上一页 1 2 3 4 5 6 7 8 ··· 14 下一页
摘要: // ConsoleApplication5.cpp : 定义控制台应用程序的入口点。 // include "stdafx.h" include include include include using namespace std; int main() { double r, x, y, x1 阅读全文
posted @ 2017-03-07 15:48 wdan2016 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 这道题比较奇怪,它的匹配规则并不是我们平时想想的那种匹配规则,例如:平时的匹配规则是()、{}、[]才能匹配,本题中(和} 、]、)都能匹配。所以做题时要好好审题。另外,本题中给的测试用例是错误的。 // ConsoleApplication5.cpp : 定义控制台应用程序的入口点。 // inc 阅读全文
posted @ 2017-03-06 11:51 wdan2016 阅读(709) 评论(0) 推荐(0) 编辑
摘要: // ConsoleApplication5.cpp : 定义控制台应用程序的入口点。 // include "stdafx.h" include include using namespace std; class MaxInnerRec { public: int countArea(vecto 阅读全文
posted @ 2017-03-06 10:20 wdan2016 阅读(1122) 评论(0) 推荐(0) 编辑
摘要: // ConsoleApplication3.cpp : 定义控制台应用程序的入口点。 // include "stdafx.h" include include include include include include using namespace std; struct Giftt { 阅读全文
posted @ 2017-03-03 17:11 wdan2016 阅读(1308) 评论(0) 推荐(0) 编辑
摘要: 如果: char c='0'; cout 阅读全文
posted @ 2017-03-01 17:22 wdan2016 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1.static_cast 最常用的类型转换符,在正常状况下的类型转换,如把int转换成float,如: int i; float f; f=(float)i; 或者 f=static_cast(i); 2.const_cast 用于取出const属性,把const类型的指针变为非const类型的指 阅读全文
posted @ 2017-03-01 17:08 wdan2016 阅读(224) 评论(0) 推荐(0) 编辑
摘要: // ConsoleApplication3.cpp : 定义控制台应用程序的入口点。 // include "stdafx.h" include include include include include using namespace std; int main() { int n; lon 阅读全文
posted @ 2017-02-28 16:11 wdan2016 阅读(1177) 评论(0) 推荐(0) 编辑
摘要: 遇到问题要常思考为什么,做这道题的时候,要注意给定的数据范围。 第一行三个整数n,r,avg(n大于等于1小于等于1e5,r大于等于1小于等于1e9,avg大于等于1小于等于1e6),接下来n行,每行两个整数ai和bi,均小于等于1e6大于等于1 上面这句话就是提示我们要用长整型。。。。。。。。。。 阅读全文
posted @ 2017-02-28 15:14 wdan2016 阅读(311) 评论(0) 推荐(0) 编辑
摘要: 第二种方法:首先分析题意,可用概率的方法来计算,做了好几道百度的题目,觉得大多数是再考概率论,所以首先要弄懂题意,最后做题前把公式写出来,这样编码时才能游刃有余。 本题中下面的第一种用迭代枚举的方法来做是不对的,仅做错误示范 // ConsoleApplication3.cpp : 定义控制台应用程 阅读全文
posted @ 2017-02-27 17:21 wdan2016 阅读(1087) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 14 下一页