旧物有情 # 奥运奖牌计数 一看就懂 摘要:``` #include #include using namespace std; int n,jin,yin,tong; int main(){ cin >> n; …… 题解列表 2024年10月17日 0 点赞 0 评论 383 浏览 评分:0.0
旧物有情 # 字符串正反连接 超简单思路 ```#include#include#includeusingnamespacestd;intn,jin,yin,tong;intmain(){charstr[55];scanf("%s",str);intlen=strlen(str);for(inti=0;i=0;i--)printf("%c", 题解列表 2024年10月17日 0 点赞 0 评论 487 浏览 评分:0.0
旧物有情 # 回文判断 两种方法 [TOC]#方法一:reverse翻转```#include#include#include#include#includeusingnamespacestd;intn,jin,yin,tong;intmain(){strings;cin>>s;stringtemp=s;reverse(s.begin 题解列表 2024年10月17日 0 点赞 0 评论 560 浏览 评分:0.0
旧物有情 # 不高兴的津津 模拟题如何写的又快又准?答案是多练 ```#includeusingnamespacestd;intmain(){//认为最开始是开心的boolhappy=true;//记录学习时间intsum=0;//记录最大时间intmax=0;//记录星期几intday=0;for(inti=1;i>x1>>x2;sum=x1+x2;//当天学习 题解列表 2024年10月17日 0 点赞 0 评论 493 浏览 评分:9.9
旧物有情 # 陶陶摘苹果 阅读理解,读懂了就很简单! ```#includeusingnamespacestd;constintN=15;inta[N];intmain(){//读取10个苹果到达地面的高度for(inti=1;i>a[i];//陶陶手伸直能碰到的最高高度inthigh;cin>>high;//板凳高30high+=30;//只要high 题解列表 2024年10月17日 2 点赞 0 评论 736 浏览 评分:9.9
旧物有情 # 1124: C语言训练-大、小写问题 这道题要考虑一个细节 ```#includeusingnamespacestd;intmain(){strings;//注意,这道题88分的同学都是因为没有考虑到读入数据可能会带有空格getline(cin,s);for(inti=0;i='A'&&s[i] 题解列表 2024年10月17日 4 点赞 0 评论 528 浏览 评分:0.0
大数Python写 摘要:参考代码:while True: n=int(input()) if n==0: break else: if n%17==0: 题解列表 2024年10月17日 0 点赞 0 评论 688 浏览 评分:0.0
旧物有情 #1557: 聪明的美食家 最长上升子序列模型 贪心两种解法 [TOC]#解法一:最长上升子序列DP推荐观看下面这个视频,也是我的dp入门老师❤【动态规划之子序列问题,元素不连续!|LeetCode:300.最长递增子序列】https://www.bilibili.com/video/BV1ng411J7xP?vd_source=28f5cb67c1d2f8f3 题解列表 2024年10月17日 2 点赞 0 评论 699 浏览 评分:10.0
旧物有情 #2818: 分离整数的各个数位 字符串翻转法 和 模拟法 [TOC]这道题目的数据范围比较弱,不存在类似于10000这种需要我们考虑前导0的问题不过大家可以思考一下如何去除前导0#字符串翻转法```#includeusingnamespacestd;intmain(){strings;cin>>s;reverse(s.begin(), 题解列表 2024年10月17日 0 点赞 0 评论 482 浏览 评分:0.0
蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:注意事项:参考代码#include <iostream>using namespace std;bool check(int x);int main(){ /*一个数奇数位为奇数,偶数位为偶…… 题解列表 2024年10月17日 0 点赞 0 评论 649 浏览 评分:6.0