摘要: 一道超级easy的贪心一眼看出了他的本质;代码: 1 #define mod 31536000 2 #include 3 #include 4 #include 5 #define maxn 100005 6 using namespace std; 7 8 struct node 9 {10 int a,b;11 double ave;12 bool operator <(const node &t)const13 {14 if(ave==t.ave) return a<t.a;15 return ave<t.ave;16 ... 阅读全文
posted @ 2013-09-18 22:16 Yours1103 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 今天模拟赛的一个模拟题;每次看到这种题就感觉很繁琐;这次静下心来写写,感觉还不错!就是很多错误,浪费了一点时间;代码: 1 #include 2 #include 3 using namespace std; 4 5 int d[4][2]= {{1,0},{0,1},{-1,0},{0,-1}}; 6 7 struct run 8 { 9 int x,y;10 int s,p,d;11 } r[2];12 int t,n;13 void go()14 {15 bool flag;16 for(int i=0; in)37 {38 ... 阅读全文
posted @ 2013-09-18 22:14 Yours1103 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 今天模拟了一场去年金华的现场赛;我和小珺两人出了5个题,感觉还可以;不过这次的题目确实比较简单;这个题目感觉不错,不难,以前见过用这种方法的,但一直没写过;这次写下练练手:思路,将角度分成1000份,然后暴力;代码: 1 #include 2 #include 3 #include 4 #define du 0.003141593 5 #define g 9.8 6 #define eps 0.0000001 7 using namespace std; 8 9 int ans,n;10 double dan[205],h,l1,r1,l2,r2;11 12 void go()13 {14 . 阅读全文
posted @ 2013-09-18 22:10 Yours1103 阅读(216) 评论(0) 推荐(0) 编辑