摘要:
由于k最大为2500,故用三重循环暴力查找x,y,z复杂度为O(n^3)会超时。s已经是定值,故可以用技巧暴力查找x,y再看看所得到的z满不满足[0,k]即可 #include<bits/stdc++.h> #define int long long using namespace std; con 阅读全文
摘要:
A 只需按照题目意思扩展h倍即可,先记录初始字符,打印时扩展为2*h根据题目公式打印 #include<bits/stdc++.h> #define int long long using namespace std; const int MAXN = 100005; int n; int a[MA 阅读全文