摘要:
链接:https://ac.nowcoder.com/acm/contest/330/B 构造题,但是有两个特判。。。 1 2 2 1 然后就水了,血亏 阅读全文
摘要:
After an uphill battle, General Li won a great victory. Now the head of state decide to reward him with honor and treasures for his great exploit. One 阅读全文
摘要:
One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps: First step: girls wil 阅读全文
摘要:
给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一样的字符串,如aba, abba等 Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S 两组case之间由空行隔开(该空行不用处理) 阅读全文
摘要:
Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strin 阅读全文
摘要:
Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell me How many kinds of necklaces total have.(if two necklaces can 阅读全文
摘要:
链接:https://ac.nowcoder.com/acm/contest/317/D 首先被数学题吓到了。gcd(n,x)==1 那么必定有 gcd(n,n-x)==1 证明略。 并且两个人的对答案贡献一样。 对于A来说 ,A*ka *k(n-a) * kb *k(n-b) = A*kRn 转化 阅读全文
摘要:
Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like tradema 阅读全文
摘要:
You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found 阅读全文
摘要:
Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing for sending it to y 阅读全文