题目大意:给定一个序列,求任意长度的上升子序列,要求字典序最小(这里的字典序是位置最小)思路:用nlogn的做法求最长上升子序列,然后从头往后扫m遍,找后面的值大的同时f数组满足相应条件的值输出。求f数组的时候,用lower_bound wa了,但用upper_bound就ac了。。。#includ...
分类:
其他好文 时间:
2015-03-27 22:06:21
阅读次数:
164
lower:lower('Sql Developer')转换成小写upper :upper('Sql Developer')转换成大写initcap:initcap('Sql Developer')转换成每个单词的首字母大写concat:concat('good','morning') 得goodm...
分类:
数据库 时间:
2015-03-21 16:55:11
阅读次数:
157
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word ...
分类:
其他好文 时间:
2015-03-20 16:16:40
阅读次数:
124
https://leetcode.com/problems/length-of-last-word/Given a stringsconsists of upper/lower-case alphabets and empty space characters' ', return the leng...
分类:
其他好文 时间:
2015-03-19 21:41:28
阅读次数:
120
Given a string s consists of upper/lower-case alphabets and empty space characters '
', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is...
分类:
其他好文 时间:
2015-03-19 20:25:02
阅读次数:
120
1. 题目Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word does not exist, return 0.Note: A word is defi...
分类:
其他好文 时间:
2015-03-17 15:52:52
阅读次数:
131
问题背景:
一个旧应用,原先应用是用proc写的,9i的库,现在应用需要改为使用OCCI,其中有一段查询逻辑:select ... where upper(state)=upper(:1)。
(此处请不要纠结于where条件中state字段使用了upper函数,因为此表数据量很小,且其历史比较悠久,未建索引。)
对应表中定义的state字段类型是char(3),但此处查询条件变量的值可能是两...
分类:
其他好文 时间:
2015-03-17 09:02:55
阅读次数:
154
There is a program
to print Fahrenheit-Celsius table as below.
#include
/* print Fahrenheit-Celsius table
for fahr = 0, 20, ..., 300 */
int main()
{
int fahr, celsius;
int lower, upper, st...
分类:
其他好文 时间:
2015-03-16 16:31:34
阅读次数:
184
SELECT UPPER(F.TABLESPACE_NAME) "表空间名", D.TOT_GROOTTE_MB "表空间大小(M)", D.TOT_GROOTTE_MB - F.TOTAL_BYTES "已使用空间(M)", TO_CHAR(ROUND((D.T...
分类:
数据库 时间:
2015-03-15 22:39:56
阅读次数:
122
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.
If the last word does not exist, return 0.
Note: A word is defin...
分类:
其他好文 时间:
2015-03-15 00:55:38
阅读次数:
170