摘要:
2023牛客国庆集训派对day1 F. Infinite String Comparision 解题思路: \(n = a.size,m = b.size\) 短的字符串不断延长,直到覆盖两倍的长串。然后按两倍长串的长度一一比较即可。 代码: #include<bits/stdc++.h> usin 阅读全文
摘要:
Codeforces Round 627 (Div. 3) A. Yet Another Tetris Problem 解题思路: 最终所有位置减去的数是相同的,也就是说能否通过\(+2\)的方式使所有数相同。 即如果存在两个数之间的差为奇数,那么就不可能同时为\(0\)。 代码: #include 阅读全文