
找规律
文章平均质量分 77
大 聪 明
Big Smart
展开
-
HDU - 7004签到(快速幂,找规律)
传送门给 a,b ,每次 a,b 会变为 a+b,a−b ,问 k 次之后变成了哪两个数,对 998244353 取模,多组数据。Input第一行一个正整数 T(1≤T≤100000) ,代表测试组数。接下来 T 行每行三个数 a,b,k(0≤a,b<998244353,0≤k≤109) 。OutputT 行每行两个整数,代表每一组数据 a,b 最后变成了什么。Sample Input22 1 55 5 100Sample Output12 4329904920 329904原创 2021-08-20 15:26:05 · 140 阅读 · 0 评论 -
CodeForces - 1526 B. I Hate 1111(规律,数学frobenius)
我是传送门You are given an integer x. Can you make x by summing up some number of 11,111,1111,11111,…? (You can use any number among them any number of times).For instance,33=11+11+11144=111+11+11+11InputThe first line of input contains a single integer t原创 2021-07-06 16:51:05 · 585 阅读 · 0 评论 -
Codeforces Round #727 (Div. 2) Stable Groups(找规律)
我是传送门There are n students numerated from 1 to n. The level of the i-th student is ai. You need to split the students into stable groups. A group of students is called stable, if in the sorted array of their levels no two neighboring elements differ by mor原创 2021-07-04 17:31:23 · 162 阅读 · 0 评论 -
CodeForces - 1539A Contest Start
我是传送门There are n people participating in some contest, they start participating in x minutes intervals. That means the first participant starts at time 0, the second participant starts at time x, the third — at time 2⋅x, and so on.Duration of contest is原创 2021-07-01 11:03:12 · 284 阅读 · 0 评论 -
HDU - 5703 Desert沙漠喝水
HDU - 5703 Desert沙漠喝水题目:原题链接:传送门.A tourist gets lost in the desert with n liters of water. He drinks positive integer units of water each day.Write a program to calculate how many different ways the tourist can drink up the water.InputThe first line原创 2021-05-08 19:47:18 · 155 阅读 · 1 评论