当前位置:网站首页>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;
}
边栏推荐
猜你喜欢
随机推荐
Node简介
redis设计与实现 笔记(一)
The situation of the solution of the equation system and the correlation transformation of the vector group
Grafana配置LDAP认证
我分析30w条数据后发现,西安新房公摊最低的竟是这里?
3dsmax2021软件安装教程
2020年适用于Linux的10个顶级开源缓存工具
本博客目录及版权申明
国产数据库的红利还能“吃”多久?
phar反序列化
leetcode 31. 下一个排列(实现next_permutation 函数)
Teach you how to use uniapp to access chat and IM instant messaging - source code sharing
广东大学生网络安全攻防大赛CTF部分WP
Redis哨兵的配置和原理
Lecture 207, Class Schedule
bzoj5063 旅游
sql合并连续时间段内,某字段相同的行。
laravel-实践
ESP8266-Arduino编程实例-ADS1015(ADC)驱动
10 Top Open Source Caching Tools for Linux in 2020









