码迷,mamicode.com
首页 >  
搜索关键字:PAT 动态地址转换    ( 13520个结果
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
1048. Find Coins
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,...
分类:其他好文   时间:2015-03-06 11:24:03    阅读次数:142
1050. String Subtraction
Given two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - S2 for any given strings. However,...
分类:其他好文   时间:2015-03-06 11:21:17    阅读次数:140
PAT (Basic Level) 1002. 写出这个数 (20)
读入一个自然数n,计算其各位数字之和,用汉语拼音写出和的每一位数字。 输入格式:每个测试输入包含1个测试用例,即给出自然数n的值。这里保证n小于10100。 输出格式:在一行内输出n的各位数字之和的每一位,拼音数字间有1 空格,但一行中最后一个拼音数字后没有空格。 输入样例:123456789098...
分类:其他好文   时间:2015-03-05 23:32:43    阅读次数:170
PAT:1069. The Black Hole of Numbers (20) AC
#include#includeusing namespace std;const int AIM=6174;int n;int arr[4];bool NonIncreasingOrder(int a,int b){ return a>b;}bool NonDecreasingOrder(int....
分类:其他好文   时间:2015-03-05 20:59:09    阅读次数:156
PAT:1019. 数字黑洞 (20) AC(同甲级1069)
#include#includeusing namespace std;const int AIM=6174;int n;int arr[4];bool NonIncreasingOrder(int a,int b){ return a>b;}bool NonDecreasingOrder(int....
分类:其他好文   时间:2015-03-05 20:52:58    阅读次数:215
PAT (Basic Level) 1001害死人不偿命的(3n+1)猜想 (15)
卡拉兹(Callatz)猜想:对任何一个自然数n,如果它是偶数,那么把它砍掉一半;如果它是奇数,那么把(3n+1)砍掉一半。这样一直反复砍下去,最后一定在某一步得到n=1。卡拉兹在1950年的世界数学家大会上公布了这个猜想,传说当时耶鲁大学师生齐动员,拼命想证明这个貌似很傻很天真的命题,结果闹得学生...
分类:其他好文   时间:2015-03-05 19:22:15    阅读次数:130
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!