摘要: A. AquaMoon and Two Arrays 题意:水 代码: int main() { ios::sync_with_stdio(false); cin.tie(nullptr),cout.tie(nullptr); //IO cin>>t; while(t--) { cin>>n; ll 阅读全文
posted @ 2021-07-13 14:57 Geospiza 阅读(84) 评论(0) 推荐(0)
摘要: A. Exciting Bets 题意:给出两个整数,定义操作为使两个整数同时加一或减一,保证两个数始终为正,求在一些操作过后能得到的最大的gcd和最小的操作次数。 思路:易得gcd(a,b)=gcd(b,a-b)=a-b时gcd最大。 代码: int main() { ios::sync_with 阅读全文
posted @ 2021-07-13 14:34 Geospiza 阅读(55) 评论(0) 推荐(0)