SPOJ
文章平均质量分 71
tokers
所有的魅力在“习惯”面前都将无色。
展开
-
SPOJ104. Highways
104. HighwaysProblem code: HIGHIn some countries building highways takes a lot of time... Maybe that's because there are many possiblities to construct a network of highways and engineers can't原创 2015-01-27 13:54:26 · 1298 阅读 · 0 评论 -
SPOJ2832--- Find The Determinant III
SPOJ Problem Set (classical)2832. Find The Determinant IIIProblem code: DETER3Given a NxN matrix A, find the Determinant of A % P.InputMultiple test cases (the size of input file is abou原创 2015-01-29 19:30:05 · 951 阅读 · 0 评论 -
SPOJ7758--- Growing Strings
Gene and Gina have a particular kind of farm. Instead of growing animals and vegetables, as it is usually the case in regular farms, they grow strings. A string is a sequence of characters. Strings hav原创 2015-02-06 13:51:45 · 1010 阅读 · 0 评论 -
SPOJ10606---Balanced Numbers(三进制数位dp)
Balanced numbers have been used by mathematicians for centuries. A positive integer is considered a balanced number if:1) Every even digit appears an odd number of times in its decimal representat原创 2015-02-28 20:46:24 · 1168 阅读 · 0 评论 -
SPOJ694--- DISUBSTR - Distinct Substrings(后缀数组)
Given a string, we need to find the total number of its distinct substrings. InputT- number of test cases. T<=20; Each test case consists of one string, whose length is <= 1000 OutputFor each test c原创 2015-03-31 19:03:37 · 765 阅读 · 0 评论 -
SPOJ220---Relevant Phrases of Annihilation(后缀数组+二分,对后缀分组)
You are the King of Byteland. Your agents have just intercepted a batch of encrypted enemy messages concerning the date of the planned attack on your island. You immedietaly send for the Bytelandian Cr原创 2015-04-07 21:43:21 · 863 阅读 · 0 评论 -
SPOJ687---REPEATS - Repeats(后缀数组+RMQ)
A string s is called an (k,l)-repeat if s is obtained by concatenating k>=1 times some seed string t with length l>=1. For example, the strings = abaabaabaabais a (4,3)-repeat with t = aba as its seed原创 2015-04-07 19:43:33 · 888 阅读 · 0 评论