当前位置:网站首页>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;
}
边栏推荐
- Jingdong T9 pure hand type 688 pages of god notes, SSM framework integrates Redis to build efficient Internet applications
- mmdetection最新版食用教程(一):安装并运行demo及开始训练coco
- 2022年中国全民健身发展白皮书
- 使用pymongo,将MongoDB生成的ObjectId类型数据与字符串之间的相互转化
- Acwing第 63 场周赛【未完结】
- 最稳定的淘宝商品详情接口
- 股票开户中金公司好不好,安全吗
- 【poi导出excel之XSSFWorkbook】
- ImportError: numpy.core.multiarray failed to import [cv2, matplotlib, PyTorch, pyinstaller ]
- 国内部分手机游戏开始显示用户IP属地
猜你喜欢
智能指针学习笔记
QCon 回顾 | Data Fabric:逻辑统一、物理分散
Nuxt - 网站接入 51LA 网站统计(详细教程)
Dry goods: design high concurrency architecture from scratch
【8.7】代码源 - 【抽卡】【LCM与GCD】
毕设-基于SSM学生考试系统
VIT:Transformer进军CV的里程碑
pytorch安装过程中出现torch.cuda.isavailable()=False问题
leetcode 31. 下一个排列(实现next_permutation 函数)
华为云分布式缓存服务Redis开通及使用规划教程【华为云至简致远】
随机推荐
3dsmax2021软件安装教程
【LeetCode】试题总结:深度优先搜索 (DFS)
MySQL 数据库
C语言学习概览(六)
leetcode 155. Min Stack最小栈(中等)
使用FastApi服务解决程序反复调试导致速度过慢的问题(以tsfresh为例)
NFT质押挖矿分红系统开发逻辑功能介绍
Groovy XML JSON
基于华为云弹性云服务器ECS(搭载openEuler的鲲鹏通用计算增强型)完成鲲鹏代码迁移工具实践【华为云至简致远】
急了,Mysql索引中最不容易记的三个知识点通透了
Kubernetes资源编排系列之四: CRD+Operator篇
UTF-8 BOM文件导致配置文件无法读取
ASP.NET Core依赖注入之旅:4.体验服务的注册和消费
使用 FasterTransformer 和 Triton 推理服务器加速大型 Transformer 模型的推理
正则什么的,你让我写,我会难受,你让我用,真香!
Spam accounts are a lot of trouble, and device fingerprints are quickly found
First online!Messaging middleware fairy notes, covering the essence of Alibaba's ten years of technology
api的封装
spark集群环境搭建
GPT3中文自动生成小说「谷歌小发猫写作」