E. Ehab's REAL Number Theory Problem 数论+图论 求最小环 题目大意: 给你一个n大小的数列,数列里的每一个元素满足以下要求: 数据范围是:\(1<=a_i<=10^6\) \(a_i\) 最多只有7个因数 题目要求在这个数列找到一个最短的子数列,子数列的所有的数相乘是一个完全平方数. 题解: 这个题对于 \(x^{3}\) 应该等价于 \(x\) ,其实就是可以除去 \(a_i\)中的所有的平方项,显而易见,这个并不影响答案. 因为 \(a_i\) 最多只…
http://codeforces.com/contest/325/problem/B B. Stadium and Games time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Daniel is organizing a football tournament. He has come up with the followin…
C - Get-Together at Den's Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice URAL 1864 Description Advertising for beer and beer-based beverages must not use images of people and animals. Russia's Fede…
任意门:http://acm.hdu.edu.cn/showproblem.php?pid=6333 Problem B. Harvest of Apples Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 4043 Accepted Submission(s): 1560 Problem Description There a…
Problem A Almost Palindrome Given a line of text, find the longest almost-palindrome substring. A string S is almost-palindrome if S begins and ends with a letter, and a(S) and b(S) have at most 2k positions with different characters Here a(S) is the…
Problem F Funny Car Racing There is a funny car racing in a city with n junctions and m directed roads. The funny part is: each road is open and closed periodically. Each road is associate with two integers (a, b), that means the road will be open fo…