摘要:
As you know, the game of "Nim" is played with n piles of stones, where the i-th pile initially contains ai stones. Two players alternate the turns. Du 阅读全文
摘要:
XOR is a kind of bit operator, we define that as follow: for two binary base number A and B, let C=A XOR B, then for each bit of C, we can get its val 阅读全文
摘要:
One day Silence is interested in revolving the digits of a positive integer. In the revolving operation, he can put several last digits to the front o 阅读全文
摘要:
Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strin 阅读全文
摘要:
Alice are given an array A[1..N]A[1..N] with NN numbers. Now Alice want to build an array BB by a parameter KK as following rules: Initially, the arra 阅读全文
摘要:
Bob intends to color the nodes of a tree with a pen. The tree consists of NN nodes. These nodes are numbered 1,2,...,N1,2,...,N. The root of the tree 阅读全文
摘要:
Alice is interesting in computation geometry problem recently. She found a interesting problem and solved it easily. Now she will give this problem to 阅读全文
摘要:
You are given a string ss. You should answer nn queries. The ii-th query consists of integer kiki and string mimi. The answer for this query is the mi 阅读全文