随笔分类 -  数学—异或相关

摘要:A. ABC 签到,不解释 #include <iostream> #include <vector> using namespace std; int main() { int t; cin >> t; while(t--) { string s; int n; cin >> n; cin >> 阅读全文
posted @ 2022-01-31 18:53 脂环 阅读(178) 评论(0) 推荐(1) 编辑
摘要:Yen-Jen loves cat very much. Now, there are 10^{18}1018 cats standing in a line, the i^ith cat's cost value c_ic**i is equal to ii, the i^ith cat's in 阅读全文
posted @ 2021-05-11 19:46 脂环 阅读(70) 评论(0) 推荐(0) 编辑
摘要:给你一个整数数组 perm ,它是前 n 个正整数的排列,且 n 是个 奇数 。 它被加密成另一个长度为 n - 1 的整数数组 encoded ,满足 encoded[i] = perm[i] XOR perm[i + 1] 。比方说,如果 perm = [1,3,2] ,那么 encoded = 阅读全文
posted @ 2021-05-11 19:28 脂环 阅读(110) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
主题色彩