首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

【ZOJ坑爹的题意跟数据】浙大 zoj 4706 Draw Something Cheat

2013-11-08 
【ZOJ坑爹的题意和数据】浙大 zoj 4706 Draw Something Cheat?/* THE PROGRAM IS MADE BY PYY *//*---------

【ZOJ坑爹的题意和数据】浙大 zoj 4706 Draw Something Cheat

?

/* THE PROGRAM IS MADE BY PYY *//*----------------------------------------//    Copyright (c) 2012 panyanyany All rights reserved.    URL   : http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4706    Name  : 4706 Draw Something Cheat    Date  : Friday, April 20, 2012    Time Stage : one hour more ?    Result:28699612012-04-20 23:06:29Accepted3603C++10188pyyTest Data :Review :注意这种情况:22AAAAAABBBBBBBBBBBBBBBBBBBBBBBB /* 此为答案 */2AAAAAABBBBCCBBBBBBBBBBBBBBBB /* 此为答案 */它的题目描述其实就是“逗你玩儿”的~上面的数据都是我一步一步试出来的,跟题目描述的真是完全不一样……//----------------------------------------*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <vector>#include <algorithm>#include <iostream>#include <queue>#include <set>#include <string>using namespace std ;#define MEM(a, v)        memset (a, v, sizeof (a))    // a for address, v for value#define INF     (0x3f3f3f3f)#define DB    /##/inttcase, n;int main(){char a[255], b[255], c;int i;while (scanf("%d", &tcase) != EOF){while (tcase--){MEM(b, INF);scanf("%d", &n);//getchar();while (n--){MEM(a, 0);getchar();for (i = 0; i < 12; ++i){c = getchar();a[c] += 1;}for (i = 0; i < 255; ++i)if (b[i] && !a[i])b[i] = 0;else if (b[i] && a[i])b[i] = b[i] < a[i] ? b[i] : a[i];}for (i = 0; i < 255; ++i)if (b[i]){while (b[i]--)printf("%c", i);}putchar('\n');}}return 0;}
?

热点排行