当前位置:网站首页>Acwing第 63 场周赛【未完结】
Acwing第 63 场周赛【未完结】
2022-08-08 16:30:00 【辉小歌】
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;
}
边栏推荐
猜你喜欢
QCon 回顾 | Data Fabric:逻辑统一、物理分散
【MATLAB项目实战】基于Morlet小波变换的滚动轴承故障特征提取研究
京东T9纯手打688页神笔记,SSM框架整合Redis搭建高效互联网应用
Share these new Blender plugins that designers must not miss in 2022
Patience sorting - specializing in quickly solving the longest increasing subarray
急了,Mysql索引中最不容易记的三个知识点通透了
Jingdong T9 pure hand type 688 pages of god notes, SSM framework integrates Redis to build efficient Internet applications
【论文阅读】RAL 2022: Receding Moving Object Segmentation in 3D LiDAR Data Using Sparse 4D Convolutions
元宇宙医疗或将改变医疗格局
GPT3中文自动生成小说「谷歌小发猫写作」
随机推荐
bzoj1507 [NOI2003]Editor
FreeRTOS知识小结
方程组解的情况与向量组相关性转化【线代碎碎念】
最稳定的淘宝商品详情接口
ESP8266-Arduino编程实例-ADXL345三轴加速计驱动
MVCC,主要是为了做什么?
使用 PyGame 的冒泡排序可视化工具
spark集群环境搭建
ERROR Failed to compile with 1 error
Es的索引操作(代码中的基本操作)
VIT:Transformer进军CV的里程碑
国内部分手机游戏开始显示用户IP属地
Take you to play with the "Super Cup" ECS features and experiment on the pit [HUAWEI CLOUD is simple and far]
使用 FasterTransformer 和 Triton 推理服务器加速大型 Transformer 模型的推理
4、S32K14X学习笔记:S32 Design Studio 新建和导入工程
UTF-8 BOM文件导致配置文件无法读取
Redis design and implementation notes (1)
mysql 索引和 pgsql 索引 命名区别
NFT质押挖矿分红系统开发逻辑功能介绍
用完华为云会议解决方案,我直接卸载了之前的会议软件【华为云至简致远】