摘要:
p/q 可以变成 p/(q-p) 或者 (q-p)/p 对于这样根据p和q的大小 进行分子分母的放置的时候 可以写递归 void calc(ll p, ll q) { if(p == 1 && q == 1) { to do } else { if(q - p >= p) { calc(p, q - 阅读全文
posted @ 2022-08-22 17:59
liang302
阅读(61)
评论(0)
推荐(0)
摘要:
##传送ABC265 https://atcoder.jp/contests/abc265/tasks/abc265_e 从原点移动n次 每次可以选择 (x,y) -> (x+a,y+b) (x,y) -> (x+c,y+d) (x,y) -> (x+e,y+f) 其中一种进行移动 求移动n次的方案 阅读全文
posted @ 2022-08-22 14:17
liang302
阅读(39)
评论(0)
推荐(0)
摘要:
##abc265 Dhttps://atcoder.jp/contests/abc265/tasks/abc265_d 找到符合条件的 x y z w 使得 前缀和s sy-1-sx-1=p sz-1-sy-1=q sr-1-sz-1=r #include<bits/stdc++.h> using 阅读全文
posted @ 2022-08-22 14:07
liang302
阅读(37)
评论(0)
推荐(0)
摘要:
##华为云挑战赛1001 求前n个区间分成m段的第(len-0.05*len)个小数 #include<bits/stdc++.h> using namespace std; void read(int &x) { char c=0;x=0; while(!isdigit(c))c=getchar( 阅读全文
posted @ 2022-08-22 13:01
liang302
阅读(38)
评论(0)
推荐(0)

浙公网安备 33010602011771号