下笔春蚕食叶声。
摘要: 看代码 建议先找找规律,推推公式哦~ #include<bits/stdc++.h>//万能头文件 using namespace std; int main() { int n; int k=0,x;//用k表示ai-1,用x表示ai ; cin>>n;//读入 for(int i=1;i<=n; 阅读全文
posted @ 2020-06-11 18:13 ACwisher 阅读(94) 评论(0) 推荐(0) 编辑
摘要: 因为要回到原点,所以有多少L就必须要有多少R,同理有多少U就必须要有多少D 所以我们知道奇数长度的不可能,直接输出-1 我们一定要统计一下各种字母的数量, 算出了 l,r字母数的差lr 和 u,d字母数的差ud 然后再进行+、-、*、/and绝对值 所以我们就开始找规律 最后通过样例的数据我试出答案 阅读全文
posted @ 2020-06-11 18:12 ACwisher 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 浮水法 简单来说就是水上浮着n条线段,由下至上上浮,浮到一半有重叠了就换其中一半继续浮。 ————————————1 ——————————2 ——3 ——————————4 ————————————————————5 _________6 如图6上浮,5无重叠,上浮,5有重叠,截去一半继续浮,之后上 阅读全文
posted @ 2020-03-14 08:10 ACwisher 阅读(444) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; #define debug prllf("*"); //#define mo 1e9+7 const ll N=1e5+5; ll n,m,x[N],st[N][20 阅读全文
posted @ 2020-02-22 17:36 ACwisher 阅读(144) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; typedef long long ll; #define debug printf("*"); //#define mo 1e9+7 const int N=2e5+5,M=2e5+5,change=1e6+ 阅读全文
posted @ 2020-02-22 15:24 ACwisher 阅读(124) 评论(0) 推荐(0) 编辑