摘要:
传送门 A New Palindrome 就判断回文串中出现的字母种类是不是大于1 #include<bits/stdc++.h> //#define int long long #define fi first #define se second using namespace std; cons 阅读全文
posted @ 2023-05-14 09:00
north_h
阅读(14)
评论(0)
推荐(0)
摘要:
传送门 C Darkness I 这个题就是找出一种放最少几个黑块能全部变黑,我么可以沿着对角线放,先以最小的那一边的正方形用对角线的方法放完,然后再两隔一列放一个,但是要注意向上取整。 #include<bits/stdc++.h> #define int long long #define fi 阅读全文
posted @ 2023-05-14 09:00
north_h
阅读(18)
评论(0)
推荐(0)
摘要:
快速幂 利用倍增的思想,将o(n)的时间复杂度优化成o(lgn) int ksm(int x,int y,int p) { int res = 1; while (y) { if (y & 1)res = (res * x) % p; x = (x * x) % p; y = y >> 1; } r 阅读全文
posted @ 2023-05-14 09:00
north_h
阅读(31)
评论(0)
推荐(0)
摘要:
传送门 A. 签到啦 排个序每次选最大的 #include<bits/stdc++.h> #define int long long #define endl '\n' #define fi first #define se second using namespace std; const int 阅读全文
posted @ 2023-05-14 09:00
north_h
阅读(14)
评论(0)
推荐(0)

浙公网安备 33010602011771号