摘要:
https://acm.hdu.edu.cn/showproblem.php?pid=7068 对于一个数,最大得分时要加上b[1],最小得分加上b[n]. 寻找最大排名,要对每个b[2->n]匹配一个a[y],使尽可能多的和小于b[1] + a[x] 显然从小到大枚举b[i],依次在a中找即可 c 阅读全文
posted @ 2021-08-17 20:41
naymi
阅读(95)
评论(0)
推荐(0)
摘要:
https://acm.hdu.edu.cn/showproblem.php?pid=7072 deque 模拟下每次加入数删除数即可,记录数是否被删除,数在左que还是右que,que中没被删除的数的个数 const int maxn = 2e7 + 7; int n, t, m, x, sizl 阅读全文
posted @ 2021-08-17 20:34
naymi
阅读(61)
评论(0)
推荐(0)
摘要:
https://acm.hdu.edu.cn/showproblem.php?pid=7067 分情况讨论,k=1,k为奇数,k为偶数 特判第一个人直接不玩的情况即可 const int maxn = 1e5 + 7; #define int long long int n, t, m, k; ve 阅读全文
posted @ 2021-08-17 19:40
naymi
阅读(39)
评论(0)
推荐(0)
摘要:
https://codeforces.com/contest/1506/problem/G 用单调栈维护拿的字母即可 const int maxn = 1e3 + 7; int n, t, m, cnt[300]; string s; void solve() { cin >> t; while ( 阅读全文
posted @ 2021-08-17 19:37
naymi
阅读(39)
评论(0)
推荐(0)