摘要:
Problem Description Before the start of contest, there are n ICPC contestants waiting in a long queue. They are labeled by 1 to n from left to right. 阅读全文
摘要:
An array of size n ≤ 10 6 is given to you. There is a sliding window of size kwhich is moving from the very left of the array to the very right. You c 阅读全文
摘要:
题目描述 A ternary string is a sequence of digits, where each digit is either 0, 1, or 2. Chiaki has a ternary string s which can self-reproduce. Every se 阅读全文
摘要:
Primitive Roots We say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (x i mod p) | 1 <= i <= p-1 } is equ 阅读全文
摘要:
Relatives Given n, a positive integer, how many positive integers less than n are relatively prime to n? Two integers a and b are relatively prime if 阅读全文
摘要:
链接:https://www.nowcoder.com/acm/contest/142/F来源:牛客网 题目描述 There's a beautiful garden whose size is n x m in Chiaki's house. The garden can be partition 阅读全文
摘要:
链接:https://www.nowcoder.com/acm/contest/142/G来源:牛客网 The mode of an integer sequence is the value that appears most often. Chiaki has n integers a1,a2, 阅读全文