摘要:
Description Description Input Output 输出 q行,第 i行输出对于第 i个询问的答案。 Sample Input 5 2 3 4 1 2 1 4 1 2 2 1 1 3 2 3 5 1 10 2 7 3 4 4 8 0 5 Sample Output 13 11 阅读全文
摘要:
Description Description 贝希和她的闺密们在她们的牛棚中玩游戏。但是天不从人愿,突然,牛棚的电源跳闸了,所有的灯都被关闭了。贝希是一个很胆小的女生,在伸手不见拇指的无尽的黑暗中,她感到惊恐,痛苦与绝望。她希望您能够帮帮她,把所有的灯都给重新开起来!她才能继续快乐地跟她的闺密们继 阅读全文
摘要:
Description Description Input Output Sample Input 3 Sample Output 1 Data Constraint Hint Solution 因为𝑎 = 𝑏时肯定无解,我们不妨设𝑎 > 𝑏。 那么有gcd(𝑎, 𝑏) ≤ 𝑎 − � 阅读全文
摘要:
Description Description Input Output Sample Input 7 3 Sample Output 4 Data Constraint Hint Soution 类似第二类𝑠𝑡𝑖𝑟𝑙𝑖𝑛𝑔数的,我们将方案分成两种:1.至少包含一个 1 的;2.一个 阅读全文
摘要:
Description Description Input Output Sample Input 3 1 2 6 Sample Output 4样例解释: f(1)=1 f(2)=1 f(6)=2 Data Constraint Solution 裸的线筛欧拉函数,最后的两个点需要特判。 1 #i 阅读全文