码迷,mamicode.com
首页 >  
搜索关键字:华为设备 静态nat 动态nat pat    ( 13726个结果
PAT:1020. Tree Traversals (25) AC
#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
PAT:1063. Set Similarity (25) AC
#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
PAT (Basic Level) 1002. 写出这个数 (20)
读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 输入格式:每个测试输入包含1个测试用例,即给出自然数n的值。这里保证n小于10100。 输出格式:在一行内输出n的各位数字之和的每一位,拼音数字间有1 空格,但一行中最后一个拼音数字后没有空格。 输入样例: 12345678909...
分类:其他好文   时间:2015-03-06 18:59:31    阅读次数:140
PAT (Basic Level) 1004. 成绩排名 (20)
读入n名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。输入格式:每个测试输入包含1个测试用例,格式为 第1行:正整数n 第2行:第1个学生的姓名 学号 成绩 第3行:第2个学生的姓名 学号 成绩 ... ... ... 第n+1行:第n个学生的姓名 学号 成绩其中姓名...
分类:其他好文   时间:2015-03-06 18:53:22    阅读次数:138
PAT:1017. A除以B (20) AC
#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
1055. The World's Richest
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
1052. Linked List Sorting
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now give...
分类:其他好文   时间:2015-03-06 15:58:03    阅读次数:163
1054. The Dominant Color
Behind the scenes in the computer's memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the d...
分类:其他好文   时间:2015-03-06 15:53:34    阅读次数:137
PAT:1015. Reversible Primes (20) AC
#include#include#includeusing namespace std;int D[111]; //存放拆解的数字int DI=0; //D的数组下标bool isPrime(int n){ if(n<=1) return 0; int ...
分类:其他好文   时间:2015-03-06 12:23:02    阅读次数:130
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!