A. Prime Subtractiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two integers x and y (it is guaranteed that x>y). You may choose any prime integer p and subtract it any number of…
A. Magic Numbers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A magic number is a number formed by concatenation of numbers 1, 14 and 144. We can use each of these numbers any number of…
Two Buttons time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing s…
You are given two strings s and t. In a single move, you can choose any of two strings and delete the first (that is, the leftmost) character. After a move, the length of the string decreases by 1. You can't choose a string if it is empty. For exampl…
Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Description Vasya has found a strange device. On the front panel of a device there are: a red button, a blue button and a display showing some positive integer. After click…
http://codeforces.com/problemset/problem/520/B B. Two Buttons time limit per test 2 seconds memory limit per test 256 megabytes input:standard input output:standard output Vasya has found a strange device. On the front panel of a device there are: a…
SortedDictionary<TKey,TValue>能对字典排序 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SortDictionary { class Program { static void Main(string[] args) { TestDictionarySort()…
Manao is trying to open a rather challenging lock. The lock has n buttons on it and to open it, you should press the buttons in a certain order to open the lock. When you push some button, it either stays pressed into the lock (that means that you've…
[CF简单介绍] 提交链接:Two Buttons 题面: B. Two Buttons time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has found a strange device. On the front panel of a device there are: a red button, a blu…
Relatively Prime Powers CodeForces - 1036F Consider some positive integer xx. Its prime factorization will be of form x=2k1⋅3k2⋅5k3⋅-x=2k1⋅3k2⋅5k3⋅- Let's call xx elegant if the greatest common divisor of the sequence k1,k2,-k1,k2,- is equal to 11. F…