NYOJ218 Dinner

原题链接

水题。

附ac代码:

#include <stdio.h>
#include <string.h>
char s[50], *a[] = {"bowl", "knife", "fork", "chopsticks"};

int main(){
	int t, i;
	while(scanf("%d", &t) == 1){
		while(t-- && scanf("%s", s))
			for(i = 0; i != 4; ++i)
				if(strcmp(s, a[i]) == 0) printf("%s ", s);
			puts("");		
	}
	return 0;
}


posted on 2014-02-15 10:38  长木Qiu  阅读(106)  评论(0编辑  收藏  举报