摘要:
嘤嘤嘤 阅读全文
摘要:
Edward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to k 阅读全文
摘要:
In computer security, Capture the Flag (CTF) is a computer security competition. CTF contests are usually designed to serve as an educational exercise 阅读全文
摘要:
Vova has won nn trophies in different competitions. Each trophy is either golden or silver. The trophies are arranged in a row. The beauty of the arra 阅读全文
摘要:
Fang Fang says she wants to be remembered. I promise her. We define the sequence FF of strings. F0 = ‘‘f",F0 = ‘‘f", F1 = ‘‘ff",F1 = ‘‘ff", F2 = ‘‘cff 阅读全文
摘要:
On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertically, to 阅读全文
摘要:
Sending Secret Messages LightOJ - 1404 Alice wants to send Bob some confidential messages. But their internet connection is not secured enough. As the 阅读全文
摘要:
Farm Tour POJ - 2135 When FJ's friends visit him on the farm, he likes to show them around. His farm comprises N (1 <= N <= 1000) fields numbered 1..N 阅读全文
摘要:
Input Output 题意:给你一颗树,选择一个三个点构成的集合,使得这三个点不在一条直线上(意思就是 从一个点出发,用一条不回头的线不能将这三个点连起来)问一共有多少个这样的集合 思路 :先求出一共有多少个集合,就是Cn3 (n-2)*(n-1)*n/6 ; 然后再求不符合条件的个数 求不符合 阅读全文
摘要:
Consider a tree T with N (1 <= N <= 20,000) nodes numbered 1...N. Deleting any node from the tree yields a forest: a collection of one or more trees. 阅读全文