摘要:
A palindrome partition is the partitioning of a string such that each separate substring is a palindrome. For example, the string "ABACABA" could be p 阅读全文
摘要:
You are given a tree with N nodes. The tree nodes are numbered from 1 to N and have colors C1, C2,. . . , CN initially. You have to handle M instructi 阅读全文
摘要:
This task is very simple. Given a string S of length n and q queries each query is on the format i j k which means sort the substring consisting of th 阅读全文
摘要:
問題文N 個の都市があり、K 本の道路と L 本の鉄道が都市の間に伸びています。 i 番目の道路は pi 番目と qi 番目の都市を双方向に結び、 i 番目の鉄道は ri 番目と si 番目の都市を双方向に結びます。 異なる道路が同じ 2 つの都市を結ぶことはありません。同様に、異なる鉄道が同じ 2 阅读全文
摘要:
We'll call an array of n non-negative integers a[1], a[2], ..., a[n] interesting, if it meets m constraints. The i-th of the m constraints consists of 阅读全文
摘要:
Some time ago Slastyona the Sweetmaid decided to open her own bakery! She bought required ingredients and a wonder-oven which can bake several types o 阅读全文