*博客头图：

RGB颜色，例如：#AFAFAF

Hover：

RGB颜色，例如：#AFAFAF

RGB颜色，例如：#AFAFAF

# 微信号codek2 专注于 Android 开源项目源码解析 开源项目分享

@Android @Java @性能优化 @开源

• 博客(260)
• 资源 (10)
• 论坛 (18)
• 问答 (1)
• 收藏
• 关注

#### 原创 Android 开源项目源码分析第一期正式发布

2015-02-10 01:03:34 2326 1

#### 原创 Android 插件化 动态升级

2014-09-19 08:08:32 1035

#### 原创 Android 开源库获取途径整理

2014-08-20 02:24:35 1437

#### 原创 Android开源项目分类汇总

2014-01-09 20:06:14 1472

#### 原创 性能优化系列总篇

2013-09-04 23:51:49 938

#### 原创 总结的一些android公共库

2012-07-16 17:40:22 1571

#### 原创 Java Android 注解(Annotation) 及几个常用开源项目注解原理简析

2014-10-17 08:26:30 938

#### 原创 Java Android 注解(Annotation) 及几个常用开源项目注解原理简析

2014-10-17 08:23:54 137

#### 原创 Android 插件化 动态升级

2014-09-19 08:06:27 109

#### 原创 Java ClassLoader基础及加载不同依赖 Jar 中的公共类

2014-09-02 01:09:39 90

#### 原创 Java ClassLoader基础及加载不同依赖 Jar 中的公共类

2014-09-02 01:09:23 1052

#### Android 开源库获取途径整理

2014-08-20 02:14:10 115

#### 原创 Android Java执行Shell命令

[b]最新内容建议直接访问原文：[/b][url]http://www.trinea.cn/android/android-java-execute-shell-commands/[/url]主要介绍Android或Java应用中如何以默认用户或root用户执行Shell命令，ShellUtils的API介绍、使用及使用场景(如静默安装和卸载、修改hosts文件、拷贝文件)。使用纯Ja...

2014-02-28 00:41:16 106

#### 原创 Android开源项目分类汇总

2014-01-09 08:18:34 67

2013-10-31 13:06:14 1212

2013-10-31 13:02:32 116

#### 原创 Android利用Fiddler进行网络数据抓包

2013-10-21 21:31:43 1687 1

#### 原创 Android常用的工具类

2013-10-12 09:26:45 911

#### 原创 Android常用的工具类

2013-10-12 09:09:40 77

#### 原创 单例模式的标准写法、注意事项、作用及测试

2013-09-09 20:57:30 87

#### 原创 性能优化系列总篇

2013-09-04 23:46:06 123

#### 原创 性能优化之Java(Android)代码优化

2013-08-26 20:46:15 982

#### 原创 性能优化之Java(Android)代码优化

2013-08-26 20:45:57 61

#### 原创 滚动到底部加载更多及下拉刷新listview的使用

2013-08-21 21:37:31 1820

#### 原创 Android ListView滑动过程中图片显示重复错乱闪烁问题解决

2013-08-21 21:31:37 1539

#### 原创 Android性能优化之布局优化

2013-08-21 21:30:18 1134

#### 原创 性能优化之数据库优化

2013-08-21 21:29:35 944

#### 原创 Android性能优化之数据库优化

2013-08-21 21:15:23 86

#### 原创 Android性能优化之布局优化

2013-08-13 20:20:50 151

#### 原创 Android ListView滑动过程中图片显示重复错乱闪烁问题解决

2013-08-07 22:24:45 141

#### 滚动到底部加载更多及下拉刷新listview的使用

2013-06-24 21:11:07 78

#### 原创 滚动到底部或顶部响应的ScrollView使用

2013-05-31 13:02:02 65

2013-05-23 13:03:08 124

#### 原创 Sqlite插入或更新

2013-05-15 09:20:44 71

#### 原创 android.os.BadParcelableException: ClassNotFoundException when unmarshalling

2013-05-08 12:55:42 140

#### 原创 viewpager实现画廊(一屏多个Fragment)效果

2013-04-08 09:15:19 201

#### Android性能调优工具TraceView介绍

2013-04-01 08:56:10 86

#### Android应用如何开机自启动、自启动失败原因

Android应用如何实现开机自启动？ 开机自启动失败的原因有哪些？ 应用是否可以在安装后自启动呢？ 没有ui界面的纯service应用能够自启动吗？ adb命令能发送广播模拟开机启动吗？ 看看上面这些疑惑的答案吧*_@ Android应用如何开机自启动、自启动失败原因 ...

2013-03-26 09:15:40 111

#### Android APK反编译查看源码及资源文件

2013-03-20 09:09:49 150

#### Android性能调优

2013-03-11 21:26:49 56

#### IEProxy IE代理

IE代理 免费代理 代理服务器 快速的代理 上网代理 浏览器免费代理 代理服务器地址列表 代理服务器软件 代理IP 代理在线 Internet Explorer 免费代理 免费代理服务器 免费代理服务器地址 免费代理软件 代理IP 代理服务器设置 通过此软件可以方便的设置IE代理，并且可以搜索网上免费的代理服务器 1.应用代理 联网搜索可用代理，用户可以通过选择列表框中的某个代理后单击应用代理或直接双击列表框中的某一行设置代理 2.联网刷新 联网搜索可用代理，显示在列表框中。对于用户保存的代理会显示在列表最上方 联网刷新会与实际的网速相关，可能需要几秒至几十秒。若网速过慢，请耐心等待。 3.开启/关闭代理 软件开始运行时可自动检测是否已经使用代理，若已使用，则按钮为关闭代理。若没有使用代理，则显示开启代理。在设置代理后会在两种状态中切换 4.软件设置 快捷键为F12 4.1可以设置软件开机自启动 4.2使用某个代理后可以自动测试代理是否可用。此选项与测试的代理速度有关，当代理不可用或速度过慢的时候可能需要几十秒，一般几秒即可。可以在右方按提示输入测试网址。默认为www.baidu.com 4.3对于使用锐捷认证的用户可以选择启动后启动锐捷，不过需要选择锐捷的安装目录。O(∩_∩)O~其实可以在这里选择任意软件跟随IEProxy启动，这要选择了正确的路径，不过不要选择本软件的地址，否则会进入死循环，桌面蹦出几十个IEProxy窗口(*^__^*) 嘻嘻…… 4.4自动判断锐捷获得IP是否正确，由于时间关系，暂时没有完成 4.5软件更新，可联系到作者csdn主页，下载最新版 5.增加新代理 输入代理地址和端口，并进行相应选择后，新增代理。可以选择长久保存代理复选框。也可以通过点击清空保存按钮清空保存的所有的代理。 6.软件相关 快捷键为F1 可以查看软件更新内容和作者的相关信息 软件相关信息 花两天多一点的时间写出来的一个小的搜寻代理程序，有点粗糙，会继续更新 只不过这一段时间会比较忙，软件更新暂时到此为止，除了设置对话框中屏蔽掉的一个功能，最初规划的功能还有一些没实现，界面也没怎么弄，两个月后接着更新，谢谢关注！有比较好的建议欢迎留言或Email ver 4.0 Beta 1.增加软件设置功能具体设置有： 1.1开机自启动 1.2选择代理后自动判断是否可用 1.3开机后自启动锐捷 1.4启动锐捷后判断IP是否正确 1.5软件更新 2.更改设置界面Tab键的顺序 3.更改主界面Tab键的顺序 4.修改设置界面中static控件覆盖 5.增加对F1键到相关的响应 6.增加对F2键到设置响应 7.完善了控件对回车的响应，包括设置 Dialog和about Dialog中的控件 8.修改设置后判断代理是否可用提示错误 9.增加密码编辑框Password属性 10.修改置顶复选框的问题 11.修改连续刷新造成的代理重复问题 12.增加了测试网站不用输入类型的功能，增加了输入提示，连接失败提示框加入测试网址可能错误的提示 13.完善了右击托盘图标的设置功能 ver 3.0 Beta 1.增加初始化时显示上次的代理列表功能 2.完善长期保存功能 3.增加清空保存功能 4.增加初始化时读取保存的代理功能 5.修改置顶功能在重置时的错误响应 6.修改static控件覆盖 ver 2.3 Beta 1.增加了所有控件对回车键的响应 2.增加置顶功能 3.更改所有控件Tab顺序 4.修改了按钮内容提示不太准确问题 ver 2.2 Beta 1.增减双击直接设置功能 2.增加最小化到托盘功能 3.修改关于信息 ver 2.0 Beta 1.增加动态更新功能 2.增加 手动增加代理功能 3.更换图标 4.去掉数据库存储 下载地址：http://download.csdn.net/user/Lethe1989 个人主页：http://hi.csdn.net/link.php?url=http://blog.csdn.net%2Fl：trinea@yahoo.cn 欢迎提供建议，谢谢O(∩_∩)O~

2009-09-19

2009-06-01

#### poj 1007 DNA Sorting

DNA Sorting Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 34868 Accepted: 13480 Description One measure of unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence DAABEC'', this measure is 5, since D is greater than four letters to its right and E is greater than one letter to its right. This measure is called the number of inversions in the sequence. The sequence AACEDGG'' has only one inversion (E and D)---it is nearly sorted---while the sequence ZWQM'' has 6 inversions (it is as unsorted as can be---exactly the reverse of sorted). You are responsible for cataloguing a sequence of DNA strings (sequences containing only the four letters A, C, G, and T). However, you want to catalog them, not in alphabetical order, but rather in order of sortedness'', from most sorted'' to least sorted''. All the strings are of the same length. Input The first line contains two integers: a positive integer n (0 < n <= 50) giving the length of the strings; and a positive integer m (0 < m <= 100) giving the number of strings. These are followed by m lines, each containing a string of length n. Output Output the list of input strings, arranged from most sorted'' to least sorted''. Since two strings can be equally sorted, then output them according to the orginal order. Sample Input 10 6 AACATGAAGG TTTTGGCCAA TTTGGCCAAA GATCAGATTT CCCGGGGGGA ATCGATGCAT Sample Output CCCGGGGGGA AACATGAAGG GATCAGATTT ATCGATGCAT TTTTGGCCAA TTTGGCCAAA Source East Central North America 1998

2009-06-01

#### poj 1006 Biorhythms 生理周期

Biorhythms Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 53539 Accepted: 15282 Description Some people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and they have periods of lengths 23, 28, and 33 days, respectively. There is one peak in each period of a cycle. At the peak of a cycle, a person performs at his or her best in the corresponding field (physical, emotional or mental). For example, if it is the mental curve, thought processes will be sharper and concentration will be easier. Since the three cycles have different periods, the peaks of the three cycles generally occur at different times. We would like to determine when a triple peak occurs (the peaks of all three cycles occur in the same day) for any person. For each cycle, you will be given the number of days from the beginning of the current year at which one of its peaks (not necessarily the first) occurs. You will also be given a date expressed as the number of days from the beginning of the current year. You task is to determine the number of days from the given date to the next triple peak. The given date is not counted. For example, if the given date is 10 and the next triple peak occurs on day 12, the answer is 2, not 3. If a triple peak occurs on the given date, you should give the number of days to the next occurrence of a triple peak. Input You will be given a number of cases. The input for each case consists of one line of four integers p, e, i, and d. The values p, e, and i are the number of days from the beginning of the current year at which the physical, emotional, and intellectual cycles peak, respectively. The value d is the given date and may be smaller than any of p, e, or i. All values are non-negative and at most 365, and you may assume that a triple peak will occur within 21252 days of the given date. The end of input is indicated by a line in which p = e = i = d = -1. Output For each test case, print the case number followed by a message indicating the number of days to the next triple peak, in the form: Case 1: the next triple peak occurs in 1234 days. Use the plural form days'' even if the answer is 1. Sample Input 0 0 0 0 0 0 0 100 5 20 34 325 4 5 6 7 283 102 23 320 203 301 203 40 -1 -1 -1 -1 Sample Output Case 1: the next triple peak occurs in 21252 days. Case 2: the next triple peak occurs in 21152 days. Case 3: the next triple peak occurs in 19575 days. Case 4: the next triple peak occurs in 16994 days. Case 5: the next triple peak occurs in 8910 days. Case 6: the next triple peak occurs in 10789 days. Source East Central North America 1999 生理周期 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 53539 Accepted: 15282 Description 人生来就有三个生理周期，分别为体力、感情和智力周期，它们的周期长度为23天、28天和33天。每一个周期中有一天是高峰。在高峰这天，人会在相应的方面表现出色。例如，智力周期的高峰，人会思维敏捷，精力容易高度集中。因为三个周期的周长不同，所以通常三个周期的高峰不会落在同一天。对于每个人，我们想知道何时三个高峰落在同一天。对于每个周期，我们会给出从当前年份的第一天开始，到出现高峰的天数（不一定是第一次高峰出现的时间）。你的任务是给定一个从当年第一天开始数的天数，输出从给定时间开始（不包括给定时间）下一次三个高峰落在同一天的时间（距给定时间的天数）。例如：给定时间为10，下次出现三个高峰同天的时间是12，则输出2（注意这里不是3）。 Input 输入四个整数：p, e, i和d。 p, e, i分别表示体力、情感和智力高峰出现的时间（时间从当年的第一天开始计算）。d 是给定的时间，可能小于p, e, 或 i。 所有给定时间是非负的并且小于365, 所求的时间小于21252。 当p = e = i = d = -1时，输入数据结束。 Output 从给定时间起，下一次三个高峰同天的时间（距离给定时间的天数）。 采用以下格式： Case 1: the next triple peak occurs in 1234 days. 注意：即使结果是1天，也使用复数形式“days”。 Sample Input 0 0 0 0 0 0 0 100 5 20 34 325 4 5 6 7 283 102 23 320 203 301 203 40 -1 -1 -1 -1 Sample Output Case 1: the next triple peak occurs in 21252 days. Case 2: the next triple peak occurs in 21152 days. Case 3: the next triple peak occurs in 19575 days. Case 4: the next triple peak occurs in 16994 days. Case 5: the next triple peak occurs in 8910 days. Case 6: the next triple peak occurs in 10789 days. Source East Central North America 1999 Translator 北京大学程序设计实习2007, Xie Di

2009-06-01

#### poj 1005 I Think I Need a Houseboat

I Think I Need a Houseboat Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 41126 Accepted: 16537 Description Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is actually shrinking by 50 square miles each year, due to erosion caused by the Mississippi River. Since Fred is hoping to live in this house the rest of his life, he needs to know if his land is going to be lost to erosion. After doing more research, Fred has learned that the land that is being lost forms a semicircle. This semicircle is part of a circle centered at (0,0), with the line that bisects the circle being the X axis. Locations below the X axis are in the water. The semicircle has an area of 0 at the beginning of year 1. (Semicircle illustrated in the Figure.) Input The first line of input will be a positive integer indicating how many data sets will be included (N). Each of the next N lines will contain the X and Y Cartesian coordinates of the land Fred is considering. These will be floating point numbers measured in miles. The Y coordinate will be non-negative. (0,0) will not be given. Output For each data set, a single line of output should appear. This line should take the form of: “Property N: This property will begin eroding in year Z.” Where N is the data set (counting from 1), and Z is the first year (start from 1) this property will be within the semicircle AT THE END OF YEAR Z. Z must be an integer. After the last data set, this should print out “END OF OUTPUT.” Sample Input 2 1.0 1.0 25.0 0.0 Sample Output Property 1: This property will begin eroding in year 1. Property 2: This property will begin eroding in year 20. END OF OUTPUT. Hint 1.No property will appear exactly on the semicircle boundary: it will either be inside or outside. 2.This problem will be judged automatically. Your answer must match exactly, including the capitalization, punctuation, and white-space. This includes the periods at the ends of the lines. 3.All locations are given in miles. Source Mid-Atlantic 2001

2009-06-01

#### poj 1004 Financial Management

Financial Management Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 49263 Accepted: 23921 Description Larry graduated this year and finally has a job. He's making a lot of money, but somehow never seems to have enough. Larry has decided that he needs to grab hold of his financial portfolio and solve his financing problems. The first step is to figure out what's been going on with his money. Larry has his bank account statements and wants to see how much money he has. Help Larry by writing a program to take his closing balance from each of the past twelve months and calculate his average account balance. Input The input will be twelve lines. Each line will contain the closing balance of his bank account for a particular month. Each number will be positive and displayed to the penny. No dollar sign will be included. Output The output will be a single number, the average (mean) of the closing balances for the twelve months. It will be rounded to the nearest penny, preceded immediately by a dollar sign, and followed by the end-of-line. There will be no other spaces or characters in the output. Sample Input 100.00 489.12 12454.12 1234.10 823.05 109.20 5.27 1542.25 839.18 83.99 1295.01 1.75 Sample Output \$1581.42 Source Mid-Atlantic 2001

2009-06-01

#### poj 1003 Hangover

Hangover Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 44187 Accepted: 20574 Description How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must be perpendicular to the table.) With two cards you can make the top card overhang the bottom one by half a card length, and the bottom one overhang the table by a third of a card length, for a total maximum overhang of 1/2 + 1/3 = 5/6 card lengths. In general you can make n cards overhang by 1/2 + 1/3 + 1/4 + ... + 1/(n + 1) card lengths, where the top card overhangs the second by 1/2, the second overhangs tha third by 1/3, the third overhangs the fourth by 1/4, etc., and the bottom card overhangs the table by 1/(n + 1). This is illustrated in the figure below. Input The input consists of one or more test cases, followed by a line containing the number 0.00 that signals the end of the input. Each test case is a single line containing a positive floating-point number c whose value is at least 0.01 and at most 5.20; c will contain exactly three digits. Output For each test case, output the minimum number of cards necessary to achieve an overhang of at least c card lengths. Use the exact output format shown in the examples. Sample Input 1.00 3.71 0.04 5.19 0.00 Sample Output 3 card(s) 61 card(s) 1 card(s) 273 card(s) Source Mid-Central USA 2001

2009-06-01

#### POJ 1002 487-3279 telephone numbers

487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 102808 Accepted: 17241 Description Businesses like to have memorable telephone numbers. One way to make a telephone number memorable is to have it spell a memorable word or phrase. For example, you can call the University of Waterloo by dialing the memorable TUT-GLOP. Sometimes only part of the number is used to spell a word. When you get back to your hotel tonight you can order a pizza from Gino's by dialing 310-GINO. Another way to make a telephone number memorable is to group the digits in a memorable way. You could order your pizza from Pizza Hut by calling their three tens'' number 3-10-10-10. The standard form of a telephone number is seven decimal digits with a hyphen between the third and fourth digits (e.g. 888-1200). The keypad of a phone supplies the mapping of letters to numbers, as follows: A, B, and C map to 2 D, E, and F map to 3 G, H, and I map to 4 J, K, and L map to 5 M, N, and O map to 6 P, R, and S map to 7 T, U, and V map to 8 W, X, and Y map to 9 There is no mapping for Q or Z. Hyphens are not dialed, and can be added and removed as necessary. The standard form of TUT-GLOP is 888-4567, the standard form of 310-GINO is 310-4466, and the standard form of 3-10-10-10 is 310-1010. Two telephone numbers are equivalent if they have the same standard form. (They dial the same number.) Your company is compiling a directory of telephone numbers from local businesses. As part of the quality control process you want to check that no two (or more) businesses in the directory have the same telephone number. Input The input will consist of one case. The first line of the input specifies the number of telephone numbers in the directory (up to 100,000) as a positive integer alone on the line. The remaining lines list the telephone numbers in the directory, with each number alone on a line. Each telephone number consists of a string composed of decimal digits, uppercase letters (excluding Q and Z) and hyphens. Exactly seven of the characters in the string will be digits or letters. Output Generate a line of output for each telephone number that appears more than once in any form. The line should give the telephone number in standard form, followed by a space, followed by the number of times the telephone number appears in the directory. Arrange the output lines by telephone number in ascending lexicographical order. If there are no duplicates in the input print the line: No duplicates. Sample Input 12 4873279 ITS-EASY 888-4567 3-10-10-10 888-GLOP TUT-GLOP 967-11-11 310-GINO F101010 888-1200 -4-8-7-3-2-7-9- 487-3279 Sample Output 310-1010 2 487-3279 4 888-4567 3 Source East Central North America 1999 487-3279 Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 102808 Accepted: 17241 Description 企业喜欢用容易被记住的电话号码。让电话号码容易被记住的一个办法是将它写成一个容易记住的单词或者短语。例如，你需要给滑铁卢大学打电话时，可以拨打TUT-GLOP。有时，只将电话号码中部分数字拼写成单词。当你晚上回到酒店，可以通过拨打310-GINO来向Gino's订一份pizza。让电话号码容易被记住的另一个办法是以一种好记的方式对号码的数字进行分组。通过拨打必胜客的“三个十”号码3-10-10-10，你可以从他们那里订pizza。 电话号码的标准格式是七位十进制数，并在第三、第四位数字之间有一个连接符。电话拨号盘提供了从字母到数字的映射，映射关系如下： A, B, 和C 映射到 2 D, E, 和F 映射到 3 G, H, 和I 映射到 4 J, K, 和L 映射到 5 M, N, 和O 映射到 6 P, R, 和S 映射到 7 T, U, 和V 映射到 8 W, X, 和Y 映射到 9 Q和Z没有映射到任何数字，连字符不需要拨号，可以任意添加和删除。 TUT-GLOP的标准格式是888-4567，310-GINO的标准格式是310-4466，3-10-10-10的标准格式是310-1010。 如果两个号码有相同的标准格式，那么他们就是等同的（相同的拨号） 你的公司正在为本地的公司编写一个电话号码薄。作为质量控制的一部分，你想要检查是否有两个和多个公司拥有相同的电话号码。 Input 输入的格式是，第一行是一个正整数，指定电话号码薄中号码的数量（最多100000）。余下的每行是一个电话号码。每个电话号码由数字，大写字母（除了Q和Z）以及连接符组成。每个电话号码中只会刚好有7个数字或者字母。 Output 对于每个出现重复的号码产生一行输出，输出是号码的标准格式紧跟一个空格然后是它的重复次数。如果存在多个重复的号码，则按照号码的字典升序输出。如果输入数据中没有重复的号码，输出一行： No duplicates. Sample Input 12 4873279 ITS-EASY 888-4567 3-10-10-10 888-GLOP TUT-GLOP 967-11-11 310-GINO F101010 888-1200 -4-8-7-3-2-7-9- 487-3279 Sample Output 310-1010 2 487-3279 4 888-4567 3 Source East Central North America 1999 Translator 北京大学程序设计实习2007

2009-06-01

#### POJ 1008 Maya Calendar

Maya Calendar Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 28541 Accepted: 8643 Description During his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, professor discovered that the Maya civilization used a 365 day long year, called Haab, which had 19 months. Each of the first 18 months was 20 days long, and the names of the months were pop, no, zip, zotz, tzec, xul, yoxkin, mol, chen, yax, zac, ceh, mac, kankin, muan, pax, koyab, cumhu. Instead of having names, the days of the months were denoted by numbers starting from 0 to 19. The last month of Haab was called uayet and had 5 days denoted by numbers 0, 1, 2, 3, 4. The Maya believed that this month was unlucky, the court of justice was not in session, the trade stopped, people did not even sweep the floor. For religious purposes, the Maya used another calendar in which the year was called Tzolkin (holly year). The year was divided into thirteen periods, each 20 days long. Each day was denoted by a pair consisting of a number and the name of the day. They used 20 names: imix, ik, akbal, kan, chicchan, cimi, manik, lamat, muluk, ok, chuen, eb, ben, ix, mem, cib, caban, eznab, canac, ahau and 13 numbers; both in cycles. Notice that each day has an unambiguous description. For example, at the beginning of the year the days were described as follows: 1 imix, 2 ik, 3 akbal, 4 kan, 5 chicchan, 6 cimi, 7 manik, 8 lamat, 9 muluk, 10 ok, 11 chuen, 12 eb, 13 ben, 1 ix, 2 mem, 3 cib, 4 caban, 5 eznab, 6 canac, 7 ahau, and again in the next period 8 imix, 9 ik, 10 akbal . . . Years (both Haab and Tzolkin) were denoted by numbers 0, 1, : : : , where the number 0 was the beginning of the world. Thus, the first day was: Haab: 0. pop 0 Tzolkin: 1 imix 0 Help professor M. A. Ya and write a program for him to convert the dates from the Haab calendar to the Tzolkin calendar. Input The date in Haab is given in the following format: NumberOfTheDay. Month Year The first line of the input file contains the number of the input dates in the file. The next n lines contain n dates in the Haab calendar format, each in separate line. The year is smaller then 5000. Output The date in Tzolkin should be in the following format: Number NameOfTheDay Year The first line of the output file contains the number of the output dates. In the next n lines, there are dates in the Tzolkin calendar format, in the order corresponding to the input dates. Sample Input 3 10. zac 0 0. pop 0 10. zac 1995 Sample Output 3 3 chuen 0 1 imix 0 9 cimi 2801

2009-04-04

#### poj 1001 Exponentiation

poj 1001 Exponentiation用字符串操作的

2008-11-12

#### 金山09年珠海训练营

TA创建的收藏夹 TA关注的收藏夹

TA关注的人 TA的粉丝