摘要:
A. Wonderful Permutation You are given a permutation p1,p2,…,pnp1,p2,…,pn of length nn and a positive integer k≤nk≤n. In one operation you can choose 阅读全文
摘要:
You are given a permutation a1,a2,…,ana1,a2,…,an of integers from 00 to n−1n−1. Your task is to find how many permutations b1,b2,…,bnb1,b2,…,bn are si 阅读全文
摘要:
题目: Byteland is a beautiful land known because of its beautiful trees. Misha has found a binary tree with nn vertices, numbered from 11 to nn. A binar 阅读全文
摘要:
A.Lex String Kuznecov likes art, poetry, and music. And strings consisting of lowercase English letters. Recently, Kuznecov has found two strings, aa 阅读全文