Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.For example,Given 1->2-...
分类:
其他好文 时间:
2014-09-18 05:24:13
阅读次数:
195
第04章:字典 当索引不好用时
Python唯一的内建的映射类型,无序,但都存储在一个特定的键中,键可以使字符,数字,或者是元祖.
------
字典使用:
表征游戏棋盘的状态,每个键都是由坐标值组成的元祖
存储文件修改的次数,文件名作为键
数字电话/地址薄
函数传递值def func(x,*args,**args):
如果要建公司员工与座机号的列表,如果要获得Alice的座机只能这么找
>>> names = ['Alice','Bob','Tom']
>>> numbers = ['1234','7...
分类:
编程语言 时间:
2014-09-17 23:26:13
阅读次数:
589
简单的素数打表,然后枚举。开始没注意n读到0结束,TLE了回。。下次再认真点。A过后讨论里面有个暴力打表过的,给跪了! 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #inc...
分类:
其他好文 时间:
2014-09-16 23:38:11
阅读次数:
331
HDU 1977 Consecutive sum II(数学)...
分类:
其他好文 时间:
2014-09-16 20:38:31
阅读次数:
225
Peter has a sequence of integers a1,?a2,?...,?an. Peter wants all numbers in the sequence to equal
h. He can perform the operation of "adding one on the segment
[l,?r]": add one to all elements of t...
分类:
其他好文 时间:
2014-09-16 14:18:20
阅读次数:
259
HDU 1492 The number of divisors(约数) about Humble Numbers(数学题)...
分类:
其他好文 时间:
2014-09-15 19:32:29
阅读次数:
190
/*to solve the problem ,i think we can use stack to maintain the numbers,and list to keep it sorted,which is very important to find the Median number....
分类:
其他好文 时间:
2014-09-15 19:07:19
阅读次数:
181
题目链接
题意:求a到b之间的平方数的数量
思路:暴力,水题
代码:
#include
#include
#include
#include
#include
using namespace std;
const int MAXN = 100005;
int vis[MAXN];
int judge(int n) {
double a = ...
分类:
其他好文 时间:
2014-09-15 17:48:29
阅读次数:
147
1.11 F'ibonates函数的变种,略过。1.12题目:The following pattern of numbers is called Pascal's triangle. 1 1 1 1 2 1 1 3 3 11 4 6 4 1.......
分类:
其他好文 时间:
2014-09-15 17:25:09
阅读次数:
227
这是由于GetProcessMemoryInfo在不同系统版本号不同导致的,官方说明如下:
Remarks
Starting with Windows 7 and Windows Server 2008 R2, Psapi.h establishes version numbers for the PSAPI functions. The PSAPI version number affect...
分类:
其他好文 时间:
2014-09-15 16:02:11
阅读次数:
1127