最近的文章
codeforces #324 div 2 A. Olesya and Rodion
·377 字·1 分钟
A. Olesya and Rodion
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output
Olesya loves numbers consisting of n digits, and Rodion only likes numbers that are divisible by t. Find some number that satisfies both of them.
Your task is: given the n and t print an integer strictly larger than zero consisting of n digits that is divisible by t. If such number doesn’t exist, print - 1.
Input
51nod_learn_greedy_活动安排2
有若干个活动,第i个开始时间和结束时间是[Si,fi),同一个教室安排的活动之间不能交叠,求要安排所有活动,最少需要几个教室?
1第一行一个正整数n (n <= 10000)代表活动的个数。 2第二行到第(n + 1)行包含n个开始时间和结束时间。 3开始时间严格小于结束时间,并且时间都是非负整数,小于1000000000 输出
一行包含一个整数表示最少教室的个数。 输入示例
codeforces #323 div 2 C. GCD Table (暴力?)
·960 字·2 分钟
C. GCD Table
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
The GCD table G of size n × n for an array of positive integers a of length n is defined by formula
Let us remind you that the greatest common divisor (GCD) of two positive integers x and y is the greatest integer that is divisor of both x and y, it is denoted as . For example, for array a = {4, 3, 6, 2} of length 4 the GCD table will look as follows: