首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
数位dp?
7条解析
开通博客写题解
Kidding_Ma
发表于 2023-10-20 21:55:46
Link A 从后往前找第一位偶数。 。 C++ Code #include "bits/stdc++.h" using namespace std; using i64 = long long; int main() { ios::sync_with_stdio(false);
展开全文
ok噜
发表于 2023-10-20 21:02:52
using namespace std; int main(){ int n; int count = 0; int first_bit = 0; int judge = 0; cin>>n; int tep1 = n; while
展开全文
lqh2022
发表于 2023-10-20 21:43:23
D. 答案最多20次,枚举前面几次+1就行。 #include<bits/stdc++.h> #define ll long long using namespace std; void solve(){ ll n; cin >> n; ll y =
展开全文
ok噜
发表于 2023-10-20 21:10:19
```#include <iostream> #include <algorithm> using namespace std; int main(){ int sum = 0; int count = 0; int n; cin>>
展开全文
CARLJOSEPHLEE
发表于 2024-10-29 10:17:11
双端队列,从前往后遍历,把前导零去掉,从后往前遍历,把末位奇数去掉。记录一下初始长度和最后长度,相减得到答案。 from collections import deque a = deque(input().strip()) oldlena = len(a) lena = len(a) while
展开全文
hover2024
发表于 2023-10-20 21:34:01
###d题 思路看代码处 #include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <queue> #include<
展开全文
玉林666
发表于 2023-10-21 00:12:21
题目已经告诉答案了,记忆化搜之[doge] #include<bits/stdc++.h> //#include<algorithm> using namespace std; using ll = long long; using pis = pair<int,in
展开全文
查看本题
查看本题讨论
相关比赛
66349-牛客小白月赛79内测
进入比赛
66877-牛客小白月赛79
进入比赛
68009-acm队周六训练
进入比赛
68291-2023Itlab_Week1
进入比赛
68307-uit机试
进入比赛
等你来战
查看全部
牛客练习赛142
报名截止时间:2025-07-11 21:30
2025年第一届上海师范大学程序设计竞赛(同步赛)
报名截止时间:2025-07-13 18:00
牛客周赛 Round 100
报名截止时间:2025-07-13 21:00
2025牛客暑期多校训练营1
报名截止时间:2025-07-15 17:00
2025牛客暑期多校训练营2
报名截止时间:2025-07-17 17:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题