Loading

摘要: 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 阅读全文
posted @ 2020-04-01 20:22 脂环 阅读(305) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-04-01 20:06 脂环 阅读(318) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-04-01 19:45 脂环 阅读(358) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2020-04-01 10:29 脂环 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 题目描述 Farmer John 计划建造 NNN 个农场,用 N−1N-1N−1 条道路连接,构成一棵树(也就是说,所有农场之间都互相可以到达,并且没有环)。每个农场有一头奶牛,品种为更赛牛或荷斯坦牛之一。 Farmer John 的 MMM 个朋友经常前来拜访他。在朋友 iii 拜访之时,Far 阅读全文
posted @ 2020-04-01 01:17 脂环 阅读(528) 评论(0) 推荐(1) 编辑
摘要: 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 阅读全文
posted @ 2020-04-01 00:09 脂环 阅读(150) 评论(0) 推荐(0) 编辑