zoj1091

maksyuki 发表于 oj 分类,标签:
0
zoj1091

Knight Moves

A friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squares on a chessboard exactly once. He thinks that the >>继续阅读

zoj1082

maksyuki 发表于 oj 分类,标签:
0
zoj1082

Stockbroker Grapevine

Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the stock market. For maximum effect, >>继续阅读

zoj1076

maksyuki 发表于 oj 分类,标签:
0
zoj1076

Gene Assembly

Statement of the Problem

With the large amount of genomic DNA sequence data being made available, it is becoming more important to find genes (parts of the genomic DNA which are responsible for the synthesis of proteins) in these se >>继续阅读

zoj1061

maksyuki 发表于 oj 分类,标签:
0
zoj1061

Web Navigation

Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be reached by moving backward and forw >>继续阅读

xdu1076

maksyuki 发表于 oj 分类,标签:
0
xdu1076

1076: 小W喜欢的数字

题目描述

大家都知道,小W是一名大帅哥,当然比起Light还是有点儿差距的!帅气的小W认为0-9这些数字,只有1,3,5是完美的。

欲问小W为什么,小W总是说“帅哥,是不需要解释的”.所以在帅哥小W的世界里, >>继续阅读

bzoj3224

maksyuki 发表于 oj 分类,标签:
0
bzoj3224

3224: Tyvj 1728 普通平衡树

Description

您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: >>继续阅读

xdu1073

maksyuki 发表于 oj 分类,标签:
0
xdu1073

1073: Nunchakus

题目描述

输入

输出

样例输入

321 131 2 331 1 3

样例输出

>>继续阅读

xdu1036

maksyuki 发表于 oj 分类,标签:
0
xdu1036

1036: 分配宝藏

题目描述

两个寻宝者找到一个宝藏,里面包含着n件物品,每件物品的价值是w[i]。suma代表寻宝者A所获物品的总价值,sumb代表寻宝者B所获物品的总价值, >>继续阅读

xdu1029

maksyuki 发表于 oj 分类,标签:
0
xdu1029

1029: 数一的逆袭

题目描述

数一是一个穷屌丝兼程序猿,是社会受剥削的底层人物,但是他有一个梦想,就是博得女神的欢心。这天,数一的女神说:"一直活在二次元的屌丝啊,一直活在二进制的程序猿啊,你们这群二货快告诉我这堆2是怎么回事?" >>继续阅读

xdu1028

maksyuki 发表于 oj 分类,标签:
0
xdu1028

1028: 数字工程

题目描述

ACM实验室开启了一个数字工程项目,希望把正整数n通过一些特殊方法变成1。

可采用的方法有:(1)减去1;(2)除以它的任意一个素因子。 每操作一次消耗一个单位的能量。

>>继续阅读

lightoj1427

maksyuki 发表于 oj 分类,标签:
0
lightoj1427

1427 - Substring Frequency (II)

InputA string is a finite sequence of symbols that are chosen from an alphabet. In this problem you are given a string T and n queries each with a string Pi, where the strings contain lower case English alphabets onl >>继续阅读

lightoj1369

maksyuki 发表于 oj 分类,标签:
0
lightoj1369

1369 - Answering Queries

long long f( int A[], int n ) { // n = size of AThe problem you need to solve here is pretty simple. You are give a function f(A, n), where A is an array of integers and n is the number of elements in the array. f(A, n) is >>继续阅读

lightoj1337

maksyuki 发表于 oj 分类,标签:
0
lightoj1337

1337 - The Crystal Maze

To be more exact, the maze can be modeled as an M x N 2D grid where M denotes the number of rows and N denotes the number of columns. There are three types of cells in the grid:You are in a plane and you are about to be drop >>继续阅读

lightoj1325

maksyuki 发表于 oj 分类,标签:
0
lightoj1325

1325 - Distributing Chocolates

InputNow as the result can be large, I asked for the result modulo 100 000 007 (a prime). But after that I found that this problem is easier than I thought. So, I changed the problem a little bit. I will give you the >>继续阅读

lightoj1319

maksyuki 发表于 oj 分类,标签:
0
lightoj1319

1319 - Monkey Tradition

1)       There are N monkeys who play this game and there are N bamboos of equal heights. Let the height be L meters.In 'MonkeyLand', there is a traditional game called "Bamboo Climbing". The rules of the game are as follows >>继续阅读

lightoj1294

maksyuki 发表于 oj 分类,标签:
0
lightoj1294

1294 - Positive Negative Sign

-1 -2 -3 +4 +5 +6 -7 -8 -9 +10 +11 +12Given two integers: n and m and n is divisible by 2m, you have to write down the first n natural numbers in the following form. At first take first m integers and make their sign n >>继续阅读