Im_hear

导航

05 2012 档案

zoj 1010
摘要:View Code 1 #include <iostream> 2 #include <cmath> 3 using namespace std; 4 5 // 精度容差 6 const double EPS = 1e-5; 7 8 // 允许容差的浮点数相等 9 inline bool equals( double x, double y ) { 10 return fabs( x - y ) < EPS; 11 } 12 13 // 点结构 14 struct Point { 15 Point() {} 16 Point( dou... 阅读全文

posted @ 2012-05-13 16:02 Im_hear 阅读(247) 评论(0) 推荐(0)

zoj 1623
摘要:View Code 1 #include <iostream> 2 #include <fstream> 3 using namespace std; 4 #include <string> 5 #include <string.h> 6 7 int main() 8 { 9 /*ifstream cin("1.txt");//*/10 /*ofstream cout("2.txt");//*/11 int cas; 12 cin>>cas; 13 char ch[10000];14 while 阅读全文

posted @ 2012-05-10 22:29 Im_hear 阅读(233) 评论(0) 推荐(0)

zoj 1024
摘要:规律题-------------------DP 1 #include <iostream> 2 #include <fstream> 3 using namespace std; 4 5 int c = 0;// 6 int isleap; 7 const int cal[2][15]={ 8 {0,31,28,31,30,31,30,31,31,30,31,30,31}, 9 {0,31,29,31,30,31,30,31,31,30,31,30,31}//leap year10 };11 bool calendar[2002][13][32] = {0};//.. 阅读全文

posted @ 2012-05-10 08:47 Im_hear 阅读(198) 评论(0) 推荐(0)

zoj 2284
摘要:View Code 1 #include <cstdio> 2 #include <iostream> 3 #include <algorithm> 4 using namespace std; 5 6 long long yanghui[22][222] = {0}; 7 8 void init() 9 {10 int row,column;11 12 for(row = 1; row < 20; ++ row){13 yanghui[row][0] = 1;14 for(column = 0; yanghui[row][col... 阅读全文

posted @ 2012-05-04 21:36 Im_hear 阅读(119) 评论(0) 推荐(0)