poj 3062 Celebrity jeopardy

简介:

 
#include <stdio.h>

int main()
{
	char a[100];

	while(gets(a))		//用scanf遇到空格就结束了
	{
		printf("%s\n",a);
	}

	return 0;
}
刚刚回到寝室,百废待兴,《算法导论》还未入手,已经很久没有写acm了,先A一些水题。

3062是一道超水题,输入字符串--输出字符串--over,但这道题至少让我又回顾了一遍scanf(s%)和gets()的异同。


相关文章
POJ 1521
//Huffman树的构造就不赘述了,使用优先队列每次选择队头的两个数并将其出列,相加后将结果放入队列中,直到队列为空为止. #include #include #include #include #include #include using namespace st...
877 0
POJ 1936 All in All
POJ 1936 All in All
86 0
|
C语言
poj 2503 查字典
Description You have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language.
879 0
|
人工智能 BI
poj-3185-开关问题
描述   牛一行20他们喝的水碗。碗可以那么(面向正确的为清凉水)或颠倒的(一个位置而没有水)。他们希望所有20个水碗那么,因此用宽鼻子翻碗。   嘴太宽,他们不仅翻转一碗还碗的碗两侧(总共三个或三个——在两端的情况下碗——两碗)。
823 0
POJ 2081
Recaman's Sequence Time Limit: 3000MS   Memory Limit: 60000K Total Submissions: 18575   Accepted: 7751 Description The Recaman's...
810 0
|
机器学习/深度学习
POJ 1012
Joseph Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 40823   Accepted: 15337 Description The Joseph's problem is notoriously known.
844 0
|
人工智能 机器学习/深度学习
|
人工智能

热门文章

最新文章