题目大意:给你一些音符之间的联系,给你一个串,让你求出这个串的最大值。-1的时候可以任意替代,其他情况必须为序列上的数。
解题思路:简单二维dp,分情况处理就可以了啊。
Hatsune Miku
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)
Total Su...
分类:
其他好文 时间:
2015-01-16 20:56:43
阅读次数:
146
测试:
效果:
System.currentTimeMillis();
currentTimeMillis()返回以毫秒为单位的当前时间,返回的是当前时间与协调世界时 1970 年 1 月 1 日午夜之间的时间差(以毫秒为单位测量)。注意,当返回值的时间单位是毫秒时,值的粒度取决于基础操作系统,并且粒度可能更大。例如,许多操作系统以几十毫秒为单位测...
分类:
编程语言 时间:
2015-01-16 19:18:05
阅读次数:
232
开启了多个协程 其中一个协程满足条件后终止select, 原以为其他的协程会在后台系统中继续悄悄运行 直到主进程关闭而关闭 。做一实验发现select 监听退出 会关闭所有监听的goroutinepackage mainimport ( "fmt" "time")var stop boo...
分类:
其他好文 时间:
2015-01-16 19:07:56
阅读次数:
255
1.Dispatch After 主要用于延迟执行一些代码。 例子: int64_t delayInSeconds = 1.0;dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_S...
分类:
编程语言 时间:
2015-01-16 18:52:32
阅读次数:
180
Given an unsorted array, find the maximum difference between the successive elements in its sorted form.Try to solve it in linear time/space.Return 0 ...
分类:
其他好文 时间:
2015-01-16 18:48:24
阅读次数:
139
最短路Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 34764Accepted Submission(s): 15062Problem Descr...
分类:
其他好文 时间:
2015-01-16 18:39:19
阅读次数:
123
package com.example.time;import android.os.Bundle;import android.os.Handler;import android.app.Activity;import android.view.Menu;import android.view.V...
分类:
其他好文 时间:
2015-01-16 18:25:19
阅读次数:
251
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes...
分类:
其他好文 时间:
2015-01-16 18:22:29
阅读次数:
136
Question:Givenanumbern,givemeafunctionthatreturnsthenthfibonaccinumber.Runningtime,spacecomplexity,iterativevs.recursive.http://www.glassdoor.com/Interview/Given-a-number-n-give-me-a-function-that-returns-the-nth-fibonacci-number-Running-time-space-complexi..
分类:
其他好文 时间:
2015-01-16 17:06:01
阅读次数:
105
Frogger
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 27020
Accepted: 8797
Description
Freddy Frog is sitting on a stone in the middle of a lake. Sud...
分类:
编程语言 时间:
2015-01-16 16:49:44
阅读次数:
208