摘要: 原来做过的贪心比较简单View Code 1 #include <stdio.h> 2 #include <string.h> 3 #include <math.h> 4 #include <algorithm> 5 using namespace std; 6 struct node 7 { 8 int x,y; 9 }il[10005];10 struct re11 {12 double x1,x2;13 }radar[10005];14 int cmp(struct re a,struct re b)15 {16 return a.x2 & 阅读全文
posted @ 2012-11-06 20:15 某某。 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 题目连接:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=1035题目大意:给你一个黑白的棋盘,每次翻一个子(翻的子上下左右也自动翻),看最后能否返程全黑或者全白、最少要几次。View Code 1 #include <stdio.h> 2 #include <string.h> 3 int ans = 10000; 4 char map[10][10]; 5 int pan() 6 { 7 int i,j; 8 for(i = 0;i < 4;i++) 9 {1 阅读全文
posted @ 2012-11-06 18:09 某某。 阅读(178) 评论(0) 推荐(0) 编辑