Codeforces Round #696 (Div. 2)
Codeforces Round #696 (Div. 2)
A. Puzzle From the Future
题解
题意为a和b相加得c,c消除所有相邻相同的数字即为d,给定b,求d最大的时候a的值,即让a和b每一位相加都和相邻位不同即可,从第0位递推到第n-1位即可。
代码
#include<bits/stdc++.h>
using namespace std;
int main() {
int t, n, k;
string a,b;
cin >> t;
while
原创
2021-02-05 12:47:29 ·
94 阅读 ·
0 评论