HDU5326 图论基础
It’s an interesting experience to move from ICPC to work, end my college life and start a brand new journey in company.
As is known to all, every stuff in a company has a title, everyone except the boss has a direct leader, and all the relat...
分类:
其他好文 时间:
2015-08-27 15:24:39
阅读次数:
273
# -*- coding: cp936 -*-fname=raw_input("filename:")printtry: fobj=open(fname,'r')except IOError,e: print "%s not exists" %fname,eelse: for ea...
分类:
编程语言 时间:
2015-08-25 16:11:52
阅读次数:
162
今天用Xcode 7 创建新项目用到 URL 发送请求时,报下面的错:“App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary except...
分类:
移动开发 时间:
2015-08-21 23:16:06
阅读次数:
945
类结构图:
/*
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Licen...
分类:
其他好文 时间:
2015-08-21 21:36:55
阅读次数:
293
5.7 An array A contains all the integers from 0 to n, except for one number which is missing. In this problem, we cannot access an entire integer in A...
分类:
其他好文 时间:
2015-08-21 13:13:09
阅读次数:
205
求除了自己之外数组所有元素的乘积。新建一个数组,每个位置保存前面所有数的乘积。反过来,另一个数组每个位置保存后面所有数乘积。两个数组每个位置相乘即为所求。这样时间复杂度为O(n);为了保证O(1)space,所以上面的操作进行融合,具体见代码。 1 class Solution { 2 public...
分类:
其他好文 时间:
2015-08-20 22:25:11
阅读次数:
185
【1】 前提:在自己不知道某个具体的异常名字,但是却要捕捉具体的异常。try:
"""error code"""
……
except Exception, exc:
print exc.__class__
……...
分类:
编程语言 时间:
2015-08-20 15:25:03
阅读次数:
271
Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a lin...
分类:
编程语言 时间:
2015-08-19 00:10:08
阅读次数:
223
leetcode -Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should ...
分类:
其他好文 时间:
2015-08-18 18:48:10
阅读次数:
99
【136-Single Number(只出现一次的数字)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a...
分类:
编程语言 时间:
2015-08-18 07:57:37
阅读次数:
233