摘要:
You may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read 阅读全文
摘要:
Word ss of length nn is called kk -complete if ss is a palindrome, i.e. si=sn+1−isi=sn+1−i for all 1≤i≤n1≤i≤n ; ss has a period of kk , i.e. si=sk+isi 阅读全文
摘要:
A positive integer is called composite if it can be represented as a product of two positive integers, both greater than 11 . For example, the followi 阅读全文
摘要:
Alice has a cute cat. To keep her cat fit, Alice wants to design an exercising walk for her cat! Initially, Alice's cat is located in a cell (x,y)(x,y 阅读全文
摘要:
You are given a rooted tree consisting of nn vertices numbered from 11 to nn . The root of the tree is a vertex number 11 . A tree is a connected undi 阅读全文
摘要:
There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want 阅读全文