Codeforces Round #684 (Div. 2) 个人总结

AI权益加码!Claude Code、Cursor等20+工具免费用! 购周边限时加赠Coding Plan Lite,畅享主流AI工具!学习进阶更高效! 阅读详情

在刚刚这场codeforces之前,我的大号经历了两个月的折磨掉了近200分到了1512,小号也被我故意掉分掉成了1250。结果今天凌晨打出了人生巅峰,大小号同时进入全球前400名,一个250行的模拟直接一次性过。凌晨的时候显示大号能+120回1630,小号能+220回1450。由于两个号交的代码差不多,于是干脆用大模拟C2把小号hack了,但是凌晨的时候非常担心会不会小号先hack掉大号呢。结果竟然大小号都没被hack???

Codeforces Round #684 (Div. 2) A - C2 题解 Codeforces Round #684 (Div. 2) A - C2 题解 A Buy the String 题意 给定一个长度为 nnn 的01串,你可以用 hhh 的代价把字符串中任意一个字符取反,最终你要把这个01串买下来,0的单价为c0c_0c0​,1的单价为 c1c_1c1​。现给你n,h,c0,c1n,h,c_0,c_1n,h,c0​,c1​以及一个01串,问你最少花多少可以买下这个串。输出最小总价。 思路 贪心,设c0<c1c_0 \lt c_1c0​<c1​,若c1−c0 阅读详情

相关推荐

codeforces 用的

我目前的级别大概只需要这些: ll q_pow(ll a, ll b, ll p) { ll ret = 1; for (; b; a = a * a % p, b >>= 1) if (b & 1) ret = ret * a % p; return ret; } ll inv(ll x, ll p) { return q_pow(x, p - 2, p); } int tree[MAXN]; inline int lowbit(int x) { return x & -x; } void insert(int pos, int k) { for (; pos &lt;= N; po

Codeforces Round #590 (Div. 3) (迷惑行为大鉴)

谁又不是个智障呢A水题B简单模拟C 成为马里奥D 找不同E 猜题意F 旋转跳跃我闭着眼 A水题 乱搞 #include<cstdio> #include<iostream> #define ll long long using namespace std; int main() { int T;cin>>T; while(T--) { ...

Yuzzzzzz的博客 361

Codeforces 题库 201-294

Codeforces 题库 201-294 共~500题 codeforces.com版权所有。 程序可提交至该网站评测。

codeforces 426/B

B. Sereja and Mirroring time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Let's assume that we are given a mat

ACM,再见! 1054

[codeforces 1300D] Aerodynamic 几何+中心对称+非中心对称+(map,pair)查重+除法避免不整除的技巧

[codeforces 1300D] Aerodynamic 几何+中心对称+非中心对称+(map,pair)查重+除法避免不整除的技巧 总目录详见https://blog.csdn.net/mrcrack/article/details/103564004 在线测评地址https://codeforces.com/contest/1300/problem/D Problem Lang...

mrcrack的博客 393

Codeforces查看被Hack的测试数据

需求 在Codeforces上如果自己的算法通过了系统测试,但是被人hack了,想查看hack所用的数据。 步骤 一、点击自己的Submissions 二、找到被Hack的题 三、用鼠标滚轮(注意不是左键)单击最左侧的题号“33733237” 四、在新打开的页面中,点击“View Test”,即可看到测试数据 更多内容请关注微信公众号 ...

小树学信奥 7496

Codeforces Round #684 (Div. 2)

Codeforces Round #684 (Div. 2) A. Buy the String #include <bits/stdc++.h> #define int ll using namespace std; typedef long long ll; const int maxn=2e5+5; void solve() { int n,c1,c0,h,sum=0; cin>>n>>c0>>c1>>h; c0=m

扣脚老骚 205

Codeforces Round #684 (Div. 2) E. Greedy Shopping

Codeforces Round #684 (Div. 2) E. Greedy Shopping 题意 给一个非严格递减的整数数组 a1,a2,…,ana_1,a_2,\dots,a_na1​,a2​,…,an​ ,表示商店的 nnn 个商品的价格。请处理 qqq 个两种类型的查询: 1 x y1\space x \space y1 x y ,表示将标号为 1,2,…,x1,2,\dots,x1,2,…,x 的商品价格更改为 max(ai,y)max(a_i,y)

bandiaoz的博客 265

Codeforces Round #684 (Div. 2) 题解

题目链接:Codeforces Round #684 (Div. 2) A. Buy the String 贪心 int main() { int t; cin >> t; while(t--) { int n,c0,c1,h; cin >> n >> c0 >> c1 >> h; string s; cin >> s; int ans=0; if(c0>c1) { if(h+c1<

张小生的先生的博客 314

CF1439 Codeforces Round #684 (Div. 1)

CF 1439 Codeforces Round #684 (Div. 1) A1 题意 一个0 / 1二维矩阵,每次操作可以选一个四宫格,并将其中三个数取反,找到在3nm步骤内将矩阵变成全0矩阵的方法。 思路 如果执行上图中的三个操作,四宫格内只有一个位置被操作了奇数次,其他位置都被操作了偶数次,因而相当于没有改变。因此,只需对每一个为1的位置都进行类似的操作就可以了。 A2 题意 一个0 / 1二维矩阵,每次操作可以选一个四宫格,并将其中三个数取反,找到在nm步骤内将矩阵变成全0矩阵的方法。 思路

micaudience的博客 355

Codeforces Round #683 (Div. 2)A-D题题解

A. Add Candies 题目传送门: A. Add Candies 题目大意: 给你一个n,表示1~n的序列。你可以进行m次操作,每次操作需选中一个其中的一个数,第 j 次操作可以让除了被选中的数的其他所有数加 j 。问你如何构造这样的m次操作使得最后所有数都相等,(操作次数不要求最小)。 思路: 只要使所有数变成1+2+3+……n即可。 AC Code #include<bits/stdc++.h> using namespace std; int main() { int t

稚始稚终的博客 373

Codeforces Round #654 (Div. 2)

Codeforces Round #684 (Div. 2) A - Buy the String 贪心模拟 #include <stdio.h> #include <iostream> #include <cstring> #include <algorithm> #include <cmath> #include <queu...

qq_43371321的博客 199

Codeforces Round #684 (Div. 2) A——C2

A. Buy the String 题目传送门: A. Buy the String 题目大意: 给你一个01字符串,购买0需要花费C0,购买1需要花费C1,01之间进行转换需要花费h。问购买整个字符串的花费。 思路: 只有 max(C0,C1) > min(C0,C1)+h时才有必要进行转换。 AC Code #include<bits/stdc++.h> using namespace std; int a[1005]; int main() { int t; scan

稚始稚终的博客 907

Codeforces Round #684 (Div. 2)题解

A. Buy the String 题解: 循环一遍判断是否转换哪个更便宜即可 代码: /* * @Author : Nightmare */ #include <bits/stdc++.h> using namespace std; #define ll long long #define ull unsigned long long #define PII pair<int,int> #define ls 2 * rt #define rs 2 * rt + 1 #defin

qq_43544481的博客 337

Codeforces Round #684 (Div. 2) 简要题解

脑子需要清楚,不要乱写

Irving0323的博客 1221

Codeforces Round #645 (Div. 2) May/26/2020 22:35UTC+8

Codeforces Round #645 Div. 2C. Celex UpdateD. The Best VacationE. Are You Fired? 比赛链接 https://codeforces.com/contest/1358 比赛记录 https://blog.csdn.net/cheng__yu_/article/details/105395197 C. Celex Update #include <bits/stdc++.h> #define ll long long u

cheng__yu_的博客 271
上一篇: LSTM最基本原理介绍
下一篇: 中前后缀表达式
141forever
博客等级 码龄8年 2粉丝 6原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值