uva12100

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

The only printer in the computer science students’ union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs in the printer queue and you may have to wait for hours to get a single page of output.

Because some jobs are m >>继续阅读

uva11988

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

You're typing a long text with a broken keyboard. Well it's not so badly broken. The only problem with the keyboard is that sometimes the "home" key or the "end" key gets automatically pressed (internally).

You're not aware of this issue, since you >>继续阅读

uva11424

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

Given the value of N, you will have to find the value of G. The definition of G is given below:G =i<N∑i=1j∑≤Nj=i+1GCD(i, j) Here GCD(i, j) means the greatest common divisor of integer i and integer j.

For those who have trouble understanding sum >>继续阅读

uva10935

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

Given is an ordered deck of n cards numbered 1 to n with card 1 at the top and card n at the bottom. The following operation is performed as long as there are at least two cards in the deck:

Throw away the top card and move the card that is now on >>继续阅读

uva1593

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

You are working in a team that writes Incredibly Customizable Programming Codewriter (ICPC) which is basically a text editor with bells and whistles. You are working on a module that takes a piece of code containing some definitions or other tabular >>继续阅读

uva10533

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

Digit Primes

A prime number is a positive number, which is divisible by exactly two different integers. A digit prime is a prime number whose sum of digits is also prime. For example the prime number 41 is a digit prime

because 4+1=5 and 5 is a p >>继续阅读

uva10168

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

Euler proved in one of his classic theorems that prime numbers are infinite in number. But can every number be expressed as a summation of four positive primes? I don’t know the answer. May be you can help!!! I want your solution to be very efficient >>继续阅读

uva1600

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

A robot has to patrol around a rectangular area which is in a form of m x n grid (m rows and n columns). The rows are labeled from 1 to m. The columns are labeled from 1 to n. A cell (i, j) denotes the cell in row iand column j in the grid. At each s >>继续阅读

uva1588

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

A research laboratory of a world-leading automobile company has received an order to create a special transmission mechanism, which allows for incredibly efficient kickdown -- an operation of switching to lower gear. After several months of research >>继续阅读

uva1587

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

Ivan works at a factory that produces heavy machinery. He has a simple job -- he knocks up wooden boxes of different sizes to pack machinery for delivery to the customers. Each box is a rectangular parallelepiped. Ivan uses six rectangular wooden pal >>继续阅读

uva1584

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

Some DNA sequences exist in circular forms as in the following figure, which shows a circular sequence CGAGTCAGCT", that is, the last symbol T" in CGAGTCAGCT" is connected to the first symbol C". We always read a circular sequence in the clockwise di >>继续阅读

uva1368

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

DNA (Deoxyribonucleic Acid) is the molecule which contains the genetic instructions. It consists of four different nucleotides, namely Adenine, Thymine, Guanine, and Cytosine as shown in Figure 1. If we represent a nucleotide by its initial character >>继续阅读

uva1339

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

Ancient Roman empire had a strong government system with various departments, including a secret service department. Important documents were sent between provinces and the capital in encrypted form to prevent eavesdropping. The most popular ciphers >>继续阅读

uva1225

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

Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N (1 < N < 10000) . After that, he counts the number of times each digit (0 to 9) appears in the s >>继续阅读

uva678

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

A number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-terminal node. It then keeps moving down, either follows the path of the left subtree, or follows the p >>继续阅读

uva455

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

A character string is said to have period k if it can be formed by concatenating one or more repetitions of another string of length k. For example, the string "abcabcabcabc" has period 3, since it is formed by 4 repetitions of the string "abc". It a >>继续阅读