排序算法(Sorting algorithm):将一串数据依照特定排序方式进行排列的一种算法...
分类:
编程语言 时间:
2014-08-18 20:37:23
阅读次数:
366
题目:codeforces 459C - Pashmak and Buses
题意:给出n个人,然后k辆车,d天时间,然后每天让n个人选择坐一辆车去上学,要去d天不能有任意两个人乘同一辆车,不能的话输出 -1
分类:数学,构造
分析:这个题目首先得分析,我开始想到的是首先用相同的放在一起,比如 7 2 3
这样构造 1 1 1 1 2 2 2
1 1 1 2 2...
分类:
其他好文 时间:
2014-08-18 20:36:52
阅读次数:
358
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
Return all such possible sentences....
分类:
其他好文 时间:
2014-08-18 20:36:22
阅读次数:
231
Intersecting LinesTime Limit:1000MSMemory Limit:10000KTotal Submissions:10967Accepted:4930DescriptionWe all know that a pair of distinct points on a p...
分类:
其他好文 时间:
2014-08-18 20:11:22
阅读次数:
244
众所周知,python中的字符串是无法改变的,反转一个字符串自然要创建一个拷贝;嘴简单的方法,当然是步长为“-1”的切片:result = astring[::-1]如果要是按单词来反转,需要三步完成:字符串--->单词列表、反转列表、单词列表--->字符串;1 result = astring.s...
分类:
编程语言 时间:
2014-08-18 20:10:02
阅读次数:
233
1. First of all, you will need to be clear on your intentions. Do you really want to play the violin? or was this wish merely conceived when your best...
分类:
其他好文 时间:
2014-08-18 20:08:42
阅读次数:
201
/* (程序头部凝视開始)* 程序的版权和版本号声明部分* Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved.* 文件名: 学生成绩管理系统 * 作 者: 刘江波 * 完毕日期: 2012 年 6 月 23 日* 版 本 号: v.623 *...
分类:
编程语言 时间:
2014-08-18 20:03:32
阅读次数:
262
1.数据类型:数字字符串列表元组字典1)数字类型:A)整形int范围是:-2147483648~2147483647Type()可以查看数据的类型。B)长整形long一般超出整形的范围的都是长整形。为了区分普通整数和长整数,需要在长整形的后面加L或者是l(小写的L)C)浮点型float带小数点的和科学技术..
分类:
编程语言 时间:
2014-08-18 18:51:32
阅读次数:
303
1.数据类型:数字字符串列表元组字典1)数字类型:A)整形int范围是:-2147483648~2147483647Type()可以查看数据的类型。B)长整形long一般超出整形的范围的都是长整形。为了区分普通整数和长整数,需要在长整形的后面加L或者是l(小写的L)C)浮点型float带小数点的和科学技术..
分类:
编程语言 时间:
2014-08-18 18:51:23
阅读次数:
258
#coding:cp936
__author__=‘JYC103‘
num_dic={‘一‘:1,‘二‘:2,‘三‘:3,‘四‘:4,‘五‘:5,‘六‘:6,‘七‘:7,‘八‘:8,‘九‘:9,‘零‘:0}
put_num=raw_input(‘输入中文数字:‘)
#printput_num
forkeyinnum_dic:
#printkey,num_dic[key]
ifput_num==key:
printput_num,‘对应的阿拉伯数字为:‘,num..
分类:
其他好文 时间:
2014-08-18 18:51:03
阅读次数:
205