摘要: 2014-06-1223:14:36题意&思路:在等腰三角形内由底向上,堆叠内切圆,算出总周长。(TAT精度判断方法是测样子强行测出来的,谁会想到判断要在while里面,遇到r #include #include using namespace std;const double INF_MIN = ... 阅读全文
posted @ 2014-06-12 23:16 Naturain 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 2014-06-1221:31:35题意&思路:哎,yy多了浪费时间,静下心来细心推导5分钟便可出。简单题不多说。#include #include #include using namespace std;int main(){ double x1,y1,x2,y2,x3,y3,C,xa,y... 阅读全文
posted @ 2014-06-12 21:33 Naturain 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 2014-06-1213:13:03题意&思路:gcd,判step,mod最大公约数是否为1,若是则good,否则bad。证明(自己yy的):给出step,mod,令a=lcd(step,mod),把mod拓展开,列出这么几项:(列1)0,mod,2mod,3mod.....,a,再列出(列2)0,... 阅读全文
posted @ 2014-06-12 13:14 Naturain 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 2014-06-1201:11:10题意&思路:素数拆分,注意一下中间判素数直接输出而防止超时。#include #include #include using namespace std;bool isprime(long long x){ for(long long i = 2; i * ... 阅读全文
posted @ 2014-06-12 01:12 Naturain 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> int judge(int y){ if((y%100==0&&y%400==0)||(y%100!=0&&y%4==0)) return 1; return 0; } int which_day(int year,int mon,int day){ int i 阅读全文
posted @ 2014-06-12 00:51 Naturain 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 2014-06-1200:06:41C++文件读入读出: (1)ifstream(fname) 建立读入流,如:ifstream fin("in.txt") (2)ostream(fname) 建立读出流 (3)getline(istream &is , string &str , char ... 阅读全文
posted @ 2014-06-12 00:07 Naturain 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 2014-06-1123:59:05题意&思路:求n!在b进制下的后缀零个数以及总位数,解决方法在总结中写过。(本来想用Stirling,后来WA了,看来精度不够呢)#include #include #include #include #include #include #include #inc... 阅读全文
posted @ 2014-06-12 00:00 Naturain 阅读(145) 评论(0) 推荐(0) 编辑