当前位置:网站首页>Acwing Week 63 [Unfinished]
Acwing Week 63 [Unfinished]
2022-08-08 16:32:00 【Fai little song】
https://www.acwing.com/activity/content/competition/problem_list/2128/
4503. 数对数量
#include<bits/stdc++.h>
using namespace std;
int main(void)
{
int a,b,n; cin>>a>>b>>n;
int cnt=0;
for(int i=0;i<=a;i++)
for(int j=0;j<=b;j++) if(i+j==n) cnt++;
cout<<cnt;
return 0;
}
4504. 字符串消除【模拟】

#include<bits/stdc++.h>
using namespace std;
int main(void)
{
string s; cin>>s;
int sum=0;
stack<char>st;
for(int i=0;i<s.size();i++)
{
st.push(s[i]);
while(st.size()>=2)
{
auto a=st.top(); st.pop();
auto b=st.top(); st.pop();
if(a==b) sum++;
else
{
st.push(b),st.push(a);
break;
}
}
}
if(sum&1) puts("Yes");
else puts("No");
return 0;
}
边栏推荐
- 耐心排序——专门快速解决最长递增子数组
- FreeRTOS知识小结
- 常见的网络安全术语之一
- MVCC,主要是为了做什么?
- Patience sorting - specializing in quickly solving the longest increasing subarray
- MySQL数据库的简介及select语句的执行流程
- The realization of the salary slip issuing function of WeChat public account + web background
- 【入门PCB】立创eda的学习
- The origin and creation of Smobiler's complex controls
- 使用 PyGame 的冒泡排序可视化工具
猜你喜欢

英特尔两大 FPGA 产品已部署至中国创新中心:性能提高 45%,功耗降低 40%

4、S32K14X学习笔记:S32 Design Studio 新建和导入工程

毕设-基于SSM学生考试系统

The origin and creation of Smobiler's complex controls

egg(二十):fs读取本地的txt文件

【LeetCode】试题总结:深度优先搜索 (DFS)

10分钟快速入门RDS【华为云至简致远】

【云原生】-MySQL压测神器HammerDB的部署及使用

leetcode 31. 下一个排列(实现next_permutation 函数)

使用 FasterTransformer 和 Triton 推理服务器加速大型 Transformer 模型的推理
随机推荐
中金财富开户安全吗?怎么操作?
leetcode 31. 下一个排列(实现next_permutation 函数)
pytorch安装过程中出现torch.cuda.isavailable()=False问题
ImportError: numpy.core.multiarray failed to import [cv2, matplotlib, PyTorch, pyinstaller ]
股票开户中金公司好不好,安全吗
‘xxxx‘ is declared but its value is never read.Vetur(6133)
开源项目管理解决方案Leantime
MySQL数据库的简介及select语句的执行流程
First online!Messaging middleware fairy notes, covering the essence of Alibaba's ten years of technology
Take you to play with the "Super Cup" ECS features and experiment on the pit [HUAWEI CLOUD is simple and far]
方程组解的情况与向量组相关性转化【线代碎碎念】
OpenAI怎么写作「谷歌小发猫写作」
Lecture 207, Class Schedule
iNFTnews | 元宇宙为企业发展带来新思路
ASP.NET Core依赖注入之旅:4.体验服务的注册和消费
api的封装
bzoj1251 序列终结者
国泰君安证券新手开户、有安全保障吗?
ggplot2可视化水平箱图并使用fct_reorder排序数据、使用na.rm处理缺失值(reorder boxplot with fct_reorder)、按照箱图的中位数从大到小排序水平箱图
egg(二十):fs读取本地的txt文件