DescriptionYour task is to calculate the sum of
some integers.InputInput contains an integer N in the first line, and then N
lines follow. Each line s...
分类:
其他好文 时间:
2014-05-23 06:41:47
阅读次数:
298
The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a litt...
分类:
其他好文 时间:
2014-05-23 02:27:26
阅读次数:
587
Rescue
Problem Description
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M
Angel's friends want to save Angel. Their task is: a...
分类:
其他好文 时间:
2014-05-23 00:06:37
阅读次数:
482
#include "STC12C5A.H"
#define TIMER_RELOAD() {TL0=0x00;TH0=0xC4;}//使能T/C
初始10ms
#define MAX_TASKS 2 //任务槽最大个数.
unsigned char idata task_stack[MAX_TASKS][2];//任务堆栈. PC指针为16位,需2个字节task_st...
分类:
编程语言 时间:
2014-05-23 00:03:19
阅读次数:
341
题目链接:hdu 4824 Disk Schedule
题目大意:中文题。
解题思路:需要的时,很明显每到一层是要读取一次数据的,但是因为需要返回00,所以有些层的数据可以在返回的过程中读取会较优。于是转化成了双调欧几里得旅行商问题。
#include
#include
#include
#include
using namespace std;
const int N =...
分类:
其他好文 时间:
2014-05-23 00:00:02
阅读次数:
382
Cancellation tokenParallel
optionsCancellationTokenSource cancellationTokenSource = new
CancellationTokenSource();Task.Factory.StartNew(() =>{ Thre...
分类:
Web程序 时间:
2014-05-22 16:43:14
阅读次数:
332
/* 播放录音文件 */private void playMusic(File
file){Intent intent = new
Intent();intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);intent.setAction(android.con...
分类:
其他好文 时间:
2014-05-22 15:18:27
阅读次数:
269
Problem Description
有很多从磁盘读取数据的需求,包括顺序读取、随机读取。为了提高效率,需要人为安排磁盘读取。然而,在现实中,这种做法很复杂。我们考虑一个相对简单的场景。磁盘有许多轨道,每个轨道有许多扇区,用于存储数据。当我们想在特定扇区来读取数据时,磁头需要跳转到特定的轨道、具体扇区进行读取操作。为了简单,我们假设磁头可以在某个轨道顺时针或逆时针匀速旋转,旋转一周的时间是36...
分类:
其他好文 时间:
2014-05-21 15:28:48
阅读次数:
250
Disk Schedule
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 2560 Accepted Submission(s): 366
Problem Description
有很多从磁盘读取数据的需求...
分类:
其他好文 时间:
2014-05-21 14:53:09
阅读次数:
272
#include "STC12C5A.H"
#define TIMER_RELOAD() {TL0=0x00;TH0=0xC4;}//使能T/C
初始10ms
#define MAX_TASKS 8 //任务槽最大个数.
unsigned char idata task_stack[MAX_TASKS][2];//任务堆栈. PC指针为16位,需2个字节。
unsi...
分类:
编程语言 时间:
2014-05-21 08:12:12
阅读次数:
285