发布时间 : 星期日 文章华东师范大学计算机机试真题更新完毕开始阅读
{
ans=0;
memset(g,0,sizeof(g)); scanf(\ for(int i=1;i<=m;i++) {
scanf(\ for(int j=1;j<=m;j++) {
if(tmp[j]=='Y') {
g[i][j]=g[j][i]=1; } } }
ans=solve(m);
printf(\ }
return 0; }
2010机试
ECNU的含义
Welcome to 2009 ACM selective trial Description
Welcome to 2009 ACM selective trial. ACM is a long way to go, and it's not just a match. So what you need to do for now is do your best! And as members of ACM lab, we are going to teach you something important. Firstly you should be proud that you are a member of ECNU, because 'E' represents \'C' represents \'N' represents \'U' represents \Second you should remember Impossible is nothing, because \represents \possible\Do you remember them clearly?
Now we will give you a string either \what does it means?
Input
The first line of input gives the number of cases, N(1 ≤ N ≤ 10). N test cases follow. Each test consists of a string which will be one of \
Output
Tell me what does it means.
Sample Input 3 E
Impossible ACM
Sample Output Excellent I'm possible Accept More
#include
char str[20]; int main() { int N;
scanf(\while(N--) {
scanf(\
if(strcmp(str,\printf(\else if(strcmp(str,\printf(\
else if(strcmp(str,\printf(\
else if(strcmp(str,\printf(\
else if(strcmp(str,\printf(\
else if(strcmp(str,\printf(\}
return 0; }
空瓶换啤酒
Soda Surpler
Description
Tim is an absolutely obsessive soda drinker,he simply cannot get enough. Most annoyingly
though, he almost never has any money, so his only obvious legal way to obtain more soda is to take the money he gets when he recycles empty soda bottles to buy new ones. In addition to the empty bottles resulting from his own consumption he sometimes find empty bottles in the street. One day he was extra thirsty, so he actually drank sodas until he couldn't aford a new one.
Input
Three non-negative integers e,f, c, where e < 1000 equals the number of empty soda bottles in Tim's possession at the start of the day, f < 1000 the number of empty soda bottles found during the day, and 1 < c < 2000 the number of empty bottles required to buy a new soda.
Output
How many sodas did Tim drink on his extra thirsty day?
Sample Input 9 0 3 5 5 2
Sample Output 4 9
#include
}
统计字符
统计字符 Description
输入一行字符,分别统计其中 英文字母、空格、数字和其他字符的个数。
Input
输入一个整数t,表示有几组数据
接下来有t行,每行字符不超过10000个
Hint 可能有空格之类的字符
Output
对于每行字符输出其中
1英文字母(大小写都算)的个数 2数字的个数
3其他字符的个数
Sample Input 2 q2 e2
qweqrwwerr232424fwetetg===2342gdsg3.,/-=@321
Sample Output character:2 number:2 others:1 character:21 number:14 others:9
#include
int cn,nn,on; scanf(\
getchar();//清除上一个换行符 while(t--) {