bzoj3229

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

3229: [Sdoi2008]石子合并

Description

在一个操场上摆放着一排N堆石子。现要将石子有次序地合并成一堆。规定每次只能选相邻的2堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的得分。

试设计一个算法,计算出将N堆石子合并成一堆的最小得分。

>>继续阅读

bzoj2818

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

2818: Gcd

Description

给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对.

Input

一个整数N

>>继续阅读

bzoj2705

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

2705: [SDOI2012]Longge的问题

Description

Longge的数学成绩非常好,并且他非常乐于挑战高难度的数学问题。现在问题来了:给定一个整数N,你需要求出∑gcd(i, N)(1<=i <=N)。

Input

一个整数,为N。

>>继续阅读

bzoj2190

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

2190: [SDOI2008]仪仗队

Description

作为体育委员,C君负责这次运动会仪仗队的训练。仪仗队是由学生组成的N * N的方阵,为了保证队伍在行进中整齐划一,C君会跟在仪仗队的左后方,根据其视线所及的学生人数来判断队伍是否整齐(如下图)。 现在,C君希望你告诉他队伍整齐时能看到的学生人数。

>>继续阅读

sgu112

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

ab-ba

You are given natural numbers a and b. Find ab-ba.

Input

Input contains numbers a and b (1≤a,b≤100).

>>继续阅读

sgu105

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

Div 3

There is sequence 1, 12, 123, 1234, ..., 12345678910, ... . Given first N elements of that sequence. You must determine amount of numbers in it that are divisible by 3.

Input

Input contains N (1<=N<=231 - 1).

Output

Write >>继续阅读

sgu104

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

Little shop of flowers

PROBLEM

You want to arrange the window of your flower shop in a most pleasant way. You have F bunches of flowers, each being of a different kind, and at least as many vases ordered in a row. The vases are glued onto >>继续阅读

sgu102

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

Coprimes

For given integer N (1<=N<=104) find amount of positive numbers not greater than N that coprime with N. Let us call two positive integers (say, A and B, for example) coprime if (and only if) their greatest common divisor is 1. >>继续阅读

Codeforces Round #317(Div.2) (3/5) (Div.1) (1/5)

maksyuki 发表于 比赛 分类,标签:
0
Codeforces Round #317(Div.2) (3/5) (Div.1) (1/5)

A. Arrays

You are given two arrays A and B consisting of integers, sorted in non-decreasing order. Check whether it is possible to >>继续阅读

BestCoder Round #52(Div.2) (0/4) (Div.1) (0/4)

maksyuki 发表于 比赛 分类,标签:
0
BestCoder Round #52(Div.2) (0/4) (Div.1) (0/4)

>>继续阅读

sgu100

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

A+B

Read integers A and B from input file and write their sum in output file.

Input

Input file contains A and B (0<A,B<10001).

>>继续阅读

Codeforces Round #312(Div.2) (2/5)

maksyuki 发表于 比赛 分类,标签:
0
Codeforces Round #312(Div.2) (2/5)

>>继续阅读

BestCoder Round #47 (0/4)

maksyuki 发表于 比赛 分类,标签:
0
BestCoder Round #47 (0/4)

>>继续阅读

Codeforces Round #311(Div.2) (2/5)

maksyuki 发表于 比赛 分类,标签:
0
Codeforces Round #311(Div.2) (2/5)

A Ilya and Diplomas

Soon a school Olympiad in Informatics will be held in Berland, n schoolchildren will participate there.

At a meeting of the jury of the Olympiad it was decided that each of the n participants, depending on the results, will ge >>继续阅读

Codeforces Round #310(Div.2) (3/5) (Div.1) (1/5)

maksyuki 发表于 比赛 分类,标签:
0
Codeforces Round #310(Div.2) (3/5) (Div.1) (1/5)

A.Case of the Zeros and Ones

Andrewid the Android is a galaxy-famous detective. In his free time he likes to think about strings containing zeros and ones.

Once he thought about a string of length n consisting of zeroes and ones. Consider the fol >>继续阅读

Codeforces Round #309(Div.2) (3/5) (Div.1) (1/5)

maksyuki 发表于 比赛 分类,标签:
0
Codeforces Round #309(Div.2) (3/5) (Div.1) (1/5)

A.Kyoya and Photobooks

Kyoya Ootori is selling photobooks of the Ouran High School Host Club. He has 26 photos, labeled "a" to "z", and he has compiled them into a photo booklet with some photos in some order (possibly with some photos being duplic >>继续阅读