其他好文[总排行] [月排行] [周排行] [日排行]
这里要用到date函数的第三种形式,下面是获得当前日期(set 'today (date (date-value) 0 "%Y%m%d")) (date-value) 返回的是1970年0点累计的秒数,作为date函数的地一个参数第二个参数是偏移的分钟,0表示没有偏移,就是现在。 这个参数主要用来做时区转换第三个参数定义日期格式,参考下表:formatdescription%aabbreviate...
分类:其他好文 时间:2014-06-02 10:56:56 阅读:477
本题要求根据火车的出发时间和达到时间,编写程序计算整个旅途所用的时间。 输入格式: 输入在一行中给出2个4位正整数,其间以空格分隔,分别表示火车的出发时间和到达时间。每个时间的格式为2位小时数(00-23)和2位分钟数(00-59),假设出发和到达在同一天内。 输出格式: 在一行输出该旅途所用的时间,格式为“hh:mm”,其中hh为2位小时数、mm为2位分钟数。 输入样例...
分类:其他好文 时间:2014-06-02 10:59:05 阅读:364
在学习计算机组成原理中的指令系统的时候,我们会遇到一个非常经典的技术流水作业。人们一般称这是一种技术,其实我更喜欢把它称为一种思想,它就是我们生活中工厂里流水作业思想在计算机中的运用。...
分类:其他好文 时间:2014-06-02 10:30:34 阅读:321
【题目】 Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For example, Given: s1 = "aabcc", s2 = "dbbca", When s3 = "aadbbcbcac", return true. When s3 = "aadbbbaccc", return false. 【题意】 给定字符串s1,s2,s3, 判断s3是不是s1和s2中的字交叉组合...
分类:其他好文 时间:2014-06-02 10:58:24 阅读:211
【题目】 Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as follows: The left subtree of a node contains only nodes with keys less than the node's key. The right subtree of a node contains only nodes with ke...
分类:其他好文 时间:2014-06-02 10:29:55 阅读:257
Subsets  Total Accepted: 13267 Total Submissions: 48509My Submissions Given a set of distinct integers, S, return all possible subsets. Note: Elements in a subset must be in non-desc...
分类:其他好文 时间:2014-06-02 10:28:35 阅读:186
【题目】 Two elements of a binary search tree (BST) are swapped by mistake. Recover the tree without changing its structure. Note: A solution using O(n) space is pretty straight forward. Could you devise a constant space solution? confused what "{1,#,2,3}" ...
分类:其他好文 时间:2014-06-02 10:38:17 阅读:246
【题目】 Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. 【题意】 判断了两个二叉树是否相等 【思路】 递归...
分类:其他好文 时间:2014-06-02 11:03:03 阅读:205
【题目】 Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / 2 2 / \ / 3 4 4 3 But the following is not: 1 / 2 2 \ 3 3 No...
分类:其他好文 时间:2014-06-02 10:56:14 阅读:237
// OpenGL.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include #include using namespace std; void init(void) { glClearColor(1.0,1.0,1.0,1.0); glClear(GL_COLOR_BUFFER_BIT); glShadeMod...
分类:其他好文 时间:2014-06-02 11:02:18 阅读:282
1145810145811145812148452
上一页1484515下一页
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!