当前位置:网站首页>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;
}
边栏推荐
猜你喜欢
随机推荐
京东T9纯手打688页神笔记,SSM框架整合Redis搭建高效互联网应用
垃圾账号不胜其烦,设备指纹快速发现
浅学软件逆向笔记(2)
找工作的我看了国聘app
手把手教你uniapp接入聊天IM即时通讯功能-源码分享
用完华为云会议解决方案,我直接卸载了之前的会议软件【华为云至简致远】
Dry goods: design high concurrency architecture from scratch
Take you to play with the "Super Cup" ECS features and experiment on the pit [HUAWEI CLOUD is simple and far]
ctfshow七夕杯复现
9.cuBLAS开发指南中文版--cuBLAS中的原子模式的配置
Kubernetes二进制部署高可用集群
10.cuBLAS开发指南中文版--cuBLAS中的logger配置
‘xxxx‘ is declared but its value is never read.Vetur(6133)
C语言学习概览(五)
MySQL中常见的内些...啥
使用 FasterTransformer 和 Triton 推理服务器加速大型 Transformer 模型的推理
基于FTP协议的Excel文件上传与下载
redis切片集群的理解
开源项目管理解决方案Leantime
C#/VB.NET convert PDF to PDF/X-1a:2001