摘要:
Pasha loves to send strictly positive integers to his friends. Pasha cares about security, therefore when he wants to send an integer nn , he encrypts 阅读全文
摘要:
Acacius is studying strings theory. Today he came with the following problem. You are given a string ss of length nn consisting of lowercase English l 阅读全文
摘要:
You are given a graph consisting of nn vertices and mm edges. It is not guaranteed that the given graph is connected. Some edges are already directed 阅读全文
摘要:
You are given a string s[1…n]s[1…n] consisting of lowercase Latin letters. It is guaranteed that n=2kn=2k for some integer k≥0k≥0 . The string s[1…n]s 阅读全文
摘要:
You are given an array aa consisting of nn integers. You have to find the length of the smallest (shortest) prefix of elements you need to erase from 阅读全文
摘要:
A permutation of length nn is a sequence of integers from 11 to nn of length nn containing each number exactly once. For example, [1][1] , [4,3,5,1,2] 阅读全文
摘要:
You are given three positive (i.e. strictly greater than zero) integers xx , yy and zz . Your task is to find positive integers aa , bb and cc such th 阅读全文