- 博客(18)
- 资源 (1)
- 收藏
- 关注
原创 【九度】题目1484:Mileage Bank
题目1484:Mileage Bank时间限制:1 秒内存限制:128 兆特殊判题:否提交:261解决:91题目描述:Mileage program of ACM (Airline of Charming Merlion) is really nice for the travelers flying frequently. Once you complete a flight wit
2014-05-30 17:08:13 1086
转载 【Python】SQLALchemy-查询篇
似乎ORM最难设计的部分是查询。特别是面向对象的查询,今天学习SQLAlchemy,发现SQLAlchemy的查询语法竟如此灵活,惊叹其如此强大的表达能力的同时也对Python也有了更深的认识。下面看一下我写的一些查询语句:Python代码:#简单查询#注意User是一个类对象,user_table是数据库中的表print(session.query(User).a
2014-05-26 15:02:58 2182
原创 【九度】题目1494:Dota
题目1494:Dota时间限制:1 秒内存限制:128 兆特殊判题:否提交:612解决:142题目描述:大家都知道在dota游戏中,装备是对于英雄来说十分重要的要素。英雄们不仅可以购买单个的装备,甚至某些特定的装备组合能够合成更强的装备。为了简化问题,我们将每个装备对于英雄的功能抽象为一个整数:价值。同时,如上所说,一些特定的装备可以用来合成更强的装备,玩家会因此获得除原装备价
2014-05-25 23:14:21 877
转载 【ubuntu】用VMware 8安装Ubuntu 12.04详细过程(图解)
图解演示环境版本:本机系统: WIN7 虚拟机:VMware Workstation 8 (英文版) 安装目标:Ubuntu Desktop 12.04 LTS (请点击这里)先下载好iso镜像文件 详细过程图解:0. 初始画面,点击“Create a New Virtual Machine”(左上Ubuntu为本人已有开发环境机,请忽略)
2014-05-21 15:48:17 597
原创 【九度】题目1375:陈博的完美主义(25分)
题目1375:陈博的完美主义(25分)时间限制:1 秒内存限制:32 兆特殊判题:否提交:1083解决:267题目描述:上一回合大家都知道,在JOBDU团队里,陈博是最讲平均主义的人,对数字十分敏感。事实上,他还是个数字完美主义者。例如看到N个数字的时候,从1到N的每个数都需要在其中出现且仅出现一次,否则他就觉得这个数字序列不完美。后来,我明白了:这是排列!对于一个整数序列d1,
2014-05-19 10:30:12 777
原创 【工作】Windows下安装Confluence
前言:最近再做一个wiki的账号自动添加功能开发,涉及到Confluence环境搭建,并且遇到了一些问题,记下来。一、zh
2014-05-16 17:09:10 10942
原创 【九度】题目1504:把数组排成最小的数
题目1504:把数组排成最小的数时间限制:1 秒内存限制:128 兆特殊判题:否提交:862解决:255题目描述:输入一个正整数数组,把数组里所有数字拼接起来排成一个数,打印能拼接出的所有数字中最小的一个。例如输入数组{3,32,321},则打印出这三个数字能排成的最小数字为321323。输入:输入可能包含多个测试样例。对于每个测试案例,输入的第一行为一个整数m (1输
2014-05-15 16:08:55 527
原创 【九度】题目1037:Powerful Calculator
题目1037:Powerful Calculator时间限制:1 秒内存限制:32 兆特殊判题:否提交:1397解决:392题目描述: Today, facing the rapid development of business, SJTU recognizes that more powerful calculator should be studied, developed
2014-05-13 12:32:25 714
原创 【九度】题目1529:棋盘寻宝
题目1529:棋盘寻宝时间限制:1 秒内存限制:128 兆特殊判题:否提交:695解决:313题目描述:现在有一个8*8的棋盘,上面放着64个价值不等的礼物,每个小的棋盘上面放置一个礼物(礼物的价值大于0小于1000),一个人的初始位置在棋盘的左上角,每次他只能向下或向右移动一步,并拿走对应棋盘上的礼物,结束位置在棋盘的右下角,请设计一个算法使其能够获得最大价值的礼物。输入:输
2014-05-08 14:30:08 1042
原创 【LeetCode】Clone Graph
Clone Graph Total Accepted: 8986 Total Submissions: 41904 My SubmissionsClone an undirected graph. Each node in the graph contains a label and a list of its neighbors.OJ's undirected graph seria
2014-05-08 13:29:35 670
原创 【LeetCode】Binary Tree Postorder Traversal 二叉树后序遍历递归以及非递归算法
Binary Tree Postorder Traversal Total Accepted: 15614 Total Submissions: 50928 My SubmissionsGiven a binary tree, return the postorder traversal of its nodes' values.For example:Given binary t
2014-05-07 18:31:28 1366
原创 【LeetCode】Binary Tree Inorder Traversal 二叉树中序遍历递归以及非递归算法
Binary Tree Inorder Traversal Total Accepted: 16494 Total Submissions: 47494Given a binary tree, return the inorder traversal of its nodes' values.For example:Given binary tree {1,#,2,3},
2014-05-07 18:21:16 1307
原创 【LeetCode】Binary Tree Preorder Traversal 二叉树前序遍历递归以及非递归算法
Binary Tree Preorder Traversal Total Accepted: 17403 Total Submissions: 50093 My SubmissionsGiven a binary tree, return the preorder traversal of its nodes' values.For example:Given binary tre
2014-05-07 17:14:12 760
原创 【九度】题目1521:二叉树的镜像
题目1521:二叉树的镜像时间限制:1 秒内存限制:128 兆特殊判题:否提交:1026解决:265题目描述:输入一个二叉树,输出其镜像。输入:输入可能包含多个测试样例,输入以EOF结束。对于每个测试案例,输入的第一行为一个整数n(0Ci=’d’表示第i个节点有两子孩子,紧接着是左孩子编号和右孩子编号。Ci=’l’表示第i个节点有一个左孩子,紧接着是左孩子的编号
2014-05-07 14:53:18 762
原创 【LeetCode】Trapping Rain Water
Trapping Rain Water Total Accepted: 8428 Total Submissions: 30087 My SubmissionsGiven n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water
2014-05-07 12:20:08 659
原创 【LeetCode】Evaluate Reverse Polish Notation
Evaluate Reverse Polish Notation Total Accepted: 11741 Total Submissions: 60315 My SubmissionsEvaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -,
2014-05-06 17:46:00 669
原创 【LeetCode】Count and Say
Count and Say Total Accepted: 7984 Total Submissions: 30169 My SubmissionsThe count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1 is read off
2014-05-06 14:43:56 1783
原创 【LeetCode】Word Ladder
Word Ladder Total Accepted: 9317 Total Submissions: 53652 My SubmissionsGiven two words (start and end), and a dictionary, find the length of shortest transformation sequence from start to end, su
2014-05-05 13:28:44 752
时间转换工具
2014-01-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人