#include#include#includeusing namespace std;int main(){ int arr[2111]; fill(arr,arr+2111,0); int n=0,tmp; while(scanf("%d",&tmp)!=EOF) //存储系数...
分类:
其他好文 时间:
2015-03-07 15:27:26
阅读次数:
111
Sherlock Holmes received a note with some strange strings: "Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm". It took him only a minute to figure out that those strange strings are a...
分类:
其他好文 时间:
2015-03-07 14:10:19
阅读次数:
103
#include#include#includeusing namespace std;const int MAX=50;int n,cnt=0; //n个节点,cnt在后序输出的时候控制空格数量用int PRE[MAX],IN[MAX]; //先序,中序int preI,inI; ...
分类:
其他好文 时间:
2015-03-07 06:15:48
阅读次数:
417
#include#include#include#includeusing namespace std;const int MAX=1010;bool tag[MAX]; //标记BFS是是否被访问过struct node{ int ID; //编号 int layer; ...
分类:
其他好文 时间:
2015-03-07 06:15:02
阅读次数:
165
#include#include#includeusing namespace std;int POST[32]; //存放后序遍历int IN[32]; //存放中序遍历int n; //节点数struct node{ int data; node* ...
分类:
其他好文 时间:
2015-03-07 06:10:30
阅读次数:
135
#include#includeusing namespace std;set str[51]; //最大51个集合 void compare(int s1,int s2){ int different=str[s1].size(),same=0; //初始化并集元素为s1元素个数...
分类:
其他好文 时间:
2015-03-06 20:34:50
阅读次数:
144
读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 输入格式:每个测试输入包含1个测试用例,即给出自然数n的值。这里保证n小于10100。 输出格式:在一行内输出n的各位数字之和的每一位,拼音数字间有1 空格,但一行中最后一个拼音数字后没有空格。 输入样例: 12345678909...
分类:
其他好文 时间:
2015-03-06 18:59:31
阅读次数:
140
读入n名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。输入格式:每个测试输入包含1个测试用例,格式为 第1行:正整数n 第2行:第1个学生的姓名 学号 成绩 第3行:第2个学生的姓名 学号 成绩 ... ... ... 第n+1行:第n个学生的姓名 学号 成绩其中姓名...
分类:
其他好文 时间:
2015-03-06 18:53:22
阅读次数:
138
#include#includechar n[1010]; //暂存输入的大整数字符串int num[1010]; //暂存可以运算的各位数字int cnt=0; //记录数字个数int chu; //除数int main(){ scanf("%s %d",n,&c...
分类:
其他好文 时间:
2015-03-06 18:32:08
阅读次数:
136
Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, but concentrate only on the peopl...
分类:
其他好文 时间:
2015-03-06 17:13:17
阅读次数:
146