2014年ACM-ICPC东北赛区热身赛D题 Number
来源:互联网 发布:深圳燕麦科技知乎 编辑:程序博客网 时间:2024/04/28 21:11
Description
A Sunday afternoon,star found a very interestring mathematicproblem in a book.Hewas so excited and quickly got the answers of the front simplesituations.Little by little,it becamemore and more difficult to do.Then star though he needs some help.Willyou the intelligentprogrammer help him to calculate this problem?
The topic is like this:suppose thereare 3*n+2 balls interconnect like the chart shows,nartual numbers 1 to 3*n+2 is these ball's serialnumber.Like the chart,the connected ball'sdifference of serial number absolute value is the sequence1,2,3......3n+1.
Input
The input contains many kinds ofcases,each case one line,contains a natural number n(n<1000).
Output
Each input case,outputs three lines,the nartual number separates with the blank space,between each kind of case separates with the white line.
2 6
1 8 4 5
3 7
2 95
1 11 4 5 7
3 106
2 125 9
1 14 4 11 78
3 136 10
Simple Input
2
3
4
Simple Output
0 2 6 0
1 8 45
0 3 70
0 2 95 0
1 11 48 7
0 3 106 0
0 2 125 9 0
1 14 411 7 8
0 3 136 10 0
- 2014年ACM-ICPC东北赛区热身赛D题 Number
- ACM-ICPC 2014 Anshan Warm-up (鞍山赛区热身赛) D题
- 2014 ACM-ICPC Beijing Warm-up (北京赛区热身赛)
- HDU5014 2014ACM-ICPC 亚洲区域赛西安赛区网络赛H题 Number Sequence
- ZOJ3822 ACM-ICPC 2014 亚洲区域赛牡丹江赛区现场赛D题Domination 概率DP
- HDU 5073 Galaxy (2014 ACM/ICPC 鞍山赛区现场赛D题)
- ZOJ3822 ACM-ICPC 2014 亚洲区域赛牡丹江赛区现场赛D题Domination 概率DP(两种解法)
- ZOJ 3820 2014ACM/ICPC牡丹江赛区B题
- 2014ACM/ICPC 广州赛区E题 (水~)
- ACM Hacker (USTC1042 合肥赛区网络预选赛热身赛 B题)
- 2013西安交大ACM热身赛D题
- 2014ACM-ICPC赛区鞍山网络预赛
- 2014ACM-ICPC西安赛区网络预赛
- 2014ACM-ICPC牡丹江赛区参赛总结
- 2014 ACM/ICPC 西安赛区 F -- color
- 2014 ACM/ICPC 鞍山赛区现场赛 D&I 解题报告
- 2014ACM/ICPC亚洲区鞍山赛区现场赛D Galaxy(hdu 5073)
- HDU 5115 Dire Wolf(2014ACM/ICPC北京赛区现场赛D)
- jquery获取checkbox 的值
- C++中字符串输入
- crm2011导入和卸载事例数据
- 有道无术,术可求也
- 湘潭邀请赛——Welcome to XTCPC
- 2014年ACM-ICPC东北赛区热身赛D题 Number
- GoldWave的消音、淡入淡出、改变音乐速率
- win7下“我的电脑” 在这里
- 求1到N之间整数中出现1的个数
- 1000!末尾 有几个0
- eclipse改变背景颜色,换个心情
- Servlet生命周期和工作原理
- 基于java的全文检索引擎的简介
- leetcode - Maximum Subarray