![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
math
klchen0112
这个作者很懒,什么都没留下…
展开
-
codeforces 1118A
codeforces 1118A一升油a元2生油b元,比较2 * a与b即可#include<bits/stdc++.h>using namespace std;#define fst first#define sec second#define sci(num) scanf("%d",&num)#define scl(num) scanf("%lld",&...原创 2019-02-21 21:24:55 · 220 阅读 · 0 评论 -
codeforces 1110A
求下B进制下的数是奇数还是偶数n=a1∗bK−1+a2n=a_1*b^{K-1} + a_2 n=a1∗bK−1+a2nmod&ThinSpace;&ThinSpace;2=((a1mod&ThinSpace;&ThinSpace;2)∗Bmod&ThinSpace;&ThinSpace;2+a2mod&ThinSpace;&...原创 2019-02-17 19:19:53 · 144 阅读 · 0 评论 -
codeforces 1110C
求对于a的f(a)=max0&lt;b&lt;agcd(a⊕b,a&amp;b)f(a) = max_{0&lt;b&lt;a}gcd(a \oplus b,a\&amp;b)f(a)=max0<b<agcd(a⊕b,a&b)打表找规律对于 a!=2x−1a != 2^x - 1a!=2x−1显然有 f(a) = 2^(x...原创 2019-02-17 19:22:19 · 153 阅读 · 0 评论 -
codeforces 1110E
看了题解才明白是看差数组变换cici′=ci+1+ci−1−cic_i&#x27; = c_{i+1} + c_{i-1} - c_i ci′=ci+1+ci−1−cici+1−ci′=ci−1−cic_{i+1} - c_i&#x27; = c_{i-1} - c_ici+1−ci′=ci−1−cici′−ci−1=ci+1−cic_i&#x2...原创 2019-02-17 19:26:07 · 187 阅读 · 0 评论 -
codeforces 1113A
V + 等差求2-(N-1-V)的和#include<bits/stdc++.h>using namespace std;#define fst first#define sec second#define sci(num) scanf("%d",&num)#define scl(num) scanf("%lld",&num)#define mem(a,b...原创 2019-02-17 19:26:54 · 149 阅读 · 0 评论