摘要:
New Year is Coming! ailyanlu is very happy today! and he is playing a chessboard game with 8600. The size of the chessboard is n n. A stone is placed 阅读全文
摘要:
Hands that shed innocent blood! There are n guilty people in a line, the i th of them holds a claw with length Li. The bell rings and every person kil 阅读全文
摘要:
You are given a string s consisting of lowercase Latin letters. Character c is called k dominant iff each substring of s with length at least k contai 阅读全文
摘要:
You have an array a with length n, you can perform operations. Each operation is like this: choose two adjacent elements from a, say x and y, and repl 阅读全文
摘要:
题目描述 有一块n m的地,每块地要么长满杂草(用'W'表示),要么是空地(用'G'表示),现在有一个人站在(1,1),面向(1,m),他可以按如下两种方式移动: 1、向面朝的方向移动一格,耗费1单位时间 2、向下移动一格,并反转面朝的方向(右变左,左变右),耗费1单位时间 现在他想知道清除所有的杂 阅读全文
摘要:
时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 给出n个整数和x,请问这n个整数中是否存在三个数a,b,c使得ax2+bx+c=0,数字可以重复使用。 输入描述: 第一行两个整数n,x 第二行n 阅读全文
摘要:
Absent minded Masha got set of n cubes for her birthday. At each of 6 faces of each cube, there is exactly one digit from 0 to 9. Masha became interes 阅读全文
摘要:
Vlad likes to eat in cafes very much. During his life, he has visited cafes n times. Unfortunately, Vlad started to feel that his last visits are not 阅读全文
摘要:
Recently Luba bought a very interesting book. She knows that it will take t seconds to read the book. Luba wants to finish reading as fast as she can. 阅读全文
摘要:
A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A f(n 1) + B f(n 2)) mod 7. Given A, B, and n, you are to calculate the value of 阅读全文