CF1480A Yet Another String Game Problem 给出一个字符串,两人轮流操作,每次操作可以将一个字符改为另外一个字符,当不可以不改动,先手目标是让最终字符串字典序最小,后手目标相反,求最终字符串。 Sol 贪心地模拟即可。 #define in read() int ...
分类:
其他好文 时间:
2021-02-15 12:23:09
阅读次数:
0
动态赋值 var str = ''; for (var i = 0; i < response.data.id_with_codes.length; i++){ str += '<option value="'+ response.data.id_with_codes[i][0] +'">'+ re ...
分类:
其他好文 时间:
2021-02-15 12:19:35
阅读次数:
0
https://codeforces.com/contest/1473/problem/E vector存图: 1 #define bug(x) cout<<#x<<" is "<<x<<endl 2 #define IO std::ios::sync_with_stdio(0),cin.tie(0 ...
分类:
其他好文 时间:
2021-02-15 12:17:20
阅读次数:
0
题目大意:给你一个序列,让你提取出一个子序列A,剩余的部分组成子序列B,现定义seg(x)表示把序列x中相邻的相同数合并成一个数后,序列x的长度,分别求seg(A)+seg(B)的最大值和最小值,n=1e5 考场上并没有想出最小值做法,只会最大值的贪心,下考才知道可以DP做?? 最大值的贪心: 维护 ...
分类:
其他好文 时间:
2021-02-15 12:14:12
阅读次数:
0
题目链接:https://acm.ecnu.edu.cn/contest/354/problem/A/ 原做法:树上倍增+lca,可能生成树的时候复杂度太高,用的是类似并查集的合并方式。 oj上的大佬:https://acm.ecnu.edu.cn/contest/354/submission/22 ...
分类:
其他好文 时间:
2021-02-15 12:10:05
阅读次数:
0
页面重定项 例:将文本框内容传递至第二个页面: Response.Redirect("Login.aspx?name=" + txtName.Text.ToString()); 获取传过来的信息: if (Request.QueryString["name"] != null) { txtName. ...
分类:
其他好文 时间:
2021-02-15 12:04:51
阅读次数:
0
正题 题目链接:https://www.luogu.com.cn/problem/AT3949 题目大意 长度为$L$的坐标轴上,给出$n$个点,每个点$x_i$需要购物$t_i$的时间,一辆车在$0\sim L$折返跑,求从$0$出发购物完回到$0$的最短时间。 \(n\in[1,3\times ...
分类:
其他好文 时间:
2021-02-15 11:59:49
阅读次数:
0
AT1981 [AGC001C] Shorten Diameter \(solved\) AT1982 [AGC001D] Arrays and Palindrome AT1983 [AGC001E] BBQ Hard \(solved\) AT1984 [AGC001F] Wide Swap AT ...
分类:
其他好文 时间:
2021-02-15 11:56:59
阅读次数:
0
https://www.acwing.com/problem/content/1139/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-15 11:53:52
阅读次数:
0
https://www.acwing.com/problem/content/1133/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-15 11:53:38
阅读次数:
0