摘要: 原题链接 题解 一句话总结:使得 \((i,j)\) 内的元素为1,且为所在列的唯一一个1,需要翻转哪些行? 在a56爆大奖在线娱乐看来,用了 随机概率异或哈希 code #include<bits/stdc++.h> #define ll long long using namespace std; mt19937 阅读全文
posted @ 2024-05-28 19:34 纯粹的 阅读(47) 评论(0) 推荐(0) 编辑
摘要: 原题链接 题解 发现一串数字的lcm一定大于等于这一串数字的最大值,a56爆大奖在线娱乐如果整个数组的lcm大于 \(a_{max}\) ,直接输出n 否则,注意这里的思维,否则,剩余数字组成的lcm一定小于等于 \(a_{max}\) 且是 \(a_{max}\) 的因子 code #include<bits/s 阅读全文
posted @ 2024-05-28 17:19 纯粹的 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 原题链接 题解 数组内是否存在两个数,使得数组内所有元素都是它们俩其中之一的倍数 1.最小的元素肯定要选,因为没人是它的倍数 2.把所有能被最小元素整除的元素去掉之后,再选一个最小数 code #include<bits/stdc++.h> #define ll long long using na 阅读全文
posted @ 2024-05-28 16:50 纯粹的 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 原题链接 题解 和破环成链的过程很像 code #include<bits/stdc++.h> using namespace std; int a[105]; int main() { int t; cin>>t; while(t--) { int n; cin>>n; int flag=0; f 阅读全文
posted @ 2024-05-28 16:41 纯粹的 阅读(5) 评论(0) 推荐(0) 编辑