摘要: 题目链接//poj 2105//2013-05-01-21.10#include char s[34];int a[8] = {128, 64, 32, 16, 8, 4, 2, 1};int main(){ int n; scanf("%d", &n); while (n--) { scanf("%s", s); int ans = 0; int f = 1; for (int i = 0; i < 32; i++) { if (s[i] == '1') ... 阅读全文
posted @ 2013-05-27 21:06 xindoo 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 题目链接详细请参考刘汝佳《算法竞赛入门经典训练指南》 p67//2013-05-01-20.40//uva 10891#include #include #include using namespace std;const int maxn = 105;bool vis[maxn][maxn];int s[maxn];int d[maxn][maxn];int dp(int i, int j){ if (vis[i][j]) return d[i][j]; vis[i][j] = true; int m = 0; for (int k = i+1; k <... 阅读全文
posted @ 2013-05-27 20:56 xindoo 阅读(136) 评论(0) 推荐(0) 编辑
摘要: A. Whose sentence is it?代码://codeforces 312 A//2013-05-01-19.12#include #include char str[102];int main(){ int n; scanf("%d", &n); getchar(); while (n--) { int f = 0; int r = 0; gets(str); int l = strlen(str); if (str[0] == 'm' && str[1] == 'i' && st... 阅读全文
posted @ 2013-05-27 19:17 xindoo 阅读(135) 评论(0) 推荐(0) 编辑