码迷,mamicode.com
首页 >  
搜索关键字:剑指offer    ( 3728个结果
UVA之11078 - Open Credit System
【题目】 Problem E Open Credit System Input: Standard Input Output: Standard Output In an open credit system, the students can choose any course they like, but there is a problem. Some of the stude...
分类:其他好文   时间:2014-05-03 00:22:50    阅读次数:380
UVA之409 - Excuses, Excuses!
Excuses, Excuses!  Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time requi...
分类:其他好文   时间:2014-05-02 23:54:43    阅读次数:474
UVA之537 - Artificial Intelligence?
Artificial Intelligence?  Physics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and underst...
分类:其他好文   时间:2014-05-02 23:39:35    阅读次数:485
UVA之10878 - Decode the tape
【题目】 Your boss has just unearthed a roll of old computer tapes. The tapes have holes in them and might contain some sort of useful information. It falls to you to figure out what is written on them...
分类:其他好文   时间:2014-05-02 23:35:16    阅读次数:526
UVA之10361 - Automatic Poetry
Problem I Automatic Poetry Input: standard input Output: standard output Time Limit: 2 seconds Memory Limit: 32 MB   “Oh God”, Lara Croft exclaims, “it’s one of these dumb rid...
分类:其他好文   时间:2014-05-02 22:51:52    阅读次数:352
庞果网之素因子集合
【题目】 题目详情 小强最近在学初等数论,老师给他们出了一个课后习题,那就是给你两个正整数A,B(0 输入描述: 输入包含多组测试数据,每组测试数据包含两个正整数A,B,以文件结束。 输出描述: 对于每组测试数据如果A和B的素因子集合相同则输出“YES”,否则输出“NO”。 答题说明 输入样例: ...
分类:其他好文   时间:2014-05-01 18:29:53    阅读次数:333
经典白话算法之二叉树各种遍历
树形结构是一类重要的非线性数据结构,其中以树和二叉树最为常用。 二叉树是每个结点最多有两个子树的有序树。通常子树的根被称作“左子树”(left subtree)和“右子树”(right subtree)。二叉树常被用作二叉查找树和二叉堆或是二叉排序树。二叉树的每个结点至多只有二棵子树(不存在度大于2的结点),二叉树的子树有左右之分,次序不能颠倒。二叉树的第i层至多有2的 i -1次方个结点;...
分类:其他好文   时间:2014-04-30 22:44:38    阅读次数:501
经典白话算法之堆排序
前序: (二叉)堆数据结构是一种数组对象,它可以被视为一棵完全二叉树。树中每个节点与数组中存放该节点值的那个元素对应。 树的每一层都是填满的,最后一层除外。 树的根为a[1] (在这里是从1开始的,也可以从0开始),给定了某个节点的下标i,其父节点为i/2,左二子为2*i,右儿子为2*i+1。 二叉堆满足二个特性: 1.父结点的键值总是大于或等于(小于或等于)任何一个...
分类:其他好文   时间:2014-04-30 22:15:38    阅读次数:434
3728条   上一页 1 ... 371 372 373
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!