数字的处理与判断 摘要:解题思路:转化为字符串问题注意事项:字符串反转,双指针参考代码:#include<bits/stdc++.h>using namespace std;string ver(string s){//反转…… 题解列表 2024年10月19日 0 点赞 0 评论 590 浏览 评分:0.0
学会找规律,这个题不复杂 摘要:参考代码:#include<bits/stdc++.h> using namespace std; int main() { int n; while(cin>>n) …… 题解列表 2024年10月17日 0 点赞 0 评论 626 浏览 评分:0.0
写了这么大一坨,终于AC了! 摘要:参考代码:#include<bits/stdc++.h> using namespace std; string s1[3]={" "," |"," |"}; string s2[3]=…… 题解列表 2024年10月17日 0 点赞 1 评论 648 浏览 评分:0.0
[信息学奥赛一本通T1550-花神游历各国] 区间更新负优化 #区间更新改为区间每个点都改一次,属于是负优化了,能过就行```cpp#include#defineULLunsignedlonglong#defineLLlonglong#defineendl'\n'#definedebug(a)cout 题解列表 2024年10月17日 1 点赞 0 评论 414 浏览 评分:9.9
蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:注意事项:参考代码#include <iostream>using namespace std;bool check(int x);int main(){ /*一个数奇数位为奇数,偶数位为偶…… 题解列表 2024年10月17日 0 点赞 0 评论 645 浏览 评分:6.0
旧物有情 #2818: 分离整数的各个数位 字符串翻转法 和 模拟法 [TOC]这道题目的数据范围比较弱,不存在类似于10000这种需要我们考虑前导0的问题不过大家可以思考一下如何去除前导0#字符串翻转法```#includeusingnamespacestd;intmain(){strings;cin>>s;reverse(s.begin(), 题解列表 2024年10月17日 0 点赞 0 评论 482 浏览 评分:0.0
旧物有情 #1557: 聪明的美食家 最长上升子序列模型 贪心两种解法 [TOC]#解法一:最长上升子序列DP推荐观看下面这个视频,也是我的dp入门老师❤【动态规划之子序列问题,元素不连续!|LeetCode:300.最长递增子序列】https://www.bilibili.com/video/BV1ng411J7xP?vd_source=28f5cb67c1d2f8f3 题解列表 2024年10月17日 2 点赞 0 评论 696 浏览 评分:10.0
旧物有情 # 1124: C语言训练-大、小写问题 这道题要考虑一个细节 ```#includeusingnamespacestd;intmain(){strings;//注意,这道题88分的同学都是因为没有考虑到读入数据可能会带有空格getline(cin,s);for(inti=0;i='A'&&s[i] 题解列表 2024年10月17日 4 点赞 0 评论 528 浏览 评分:0.0
旧物有情 # 陶陶摘苹果 阅读理解,读懂了就很简单! ```#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
旧物有情 # 不高兴的津津 模拟题如何写的又快又准?答案是多练 ```#includeusingnamespacestd;intmain(){//认为最开始是开心的boolhappy=true;//记录学习时间intsum=0;//记录最大时间intmax=0;//记录星期几intday=0;for(inti=1;i>x1>>x2;sum=x1+x2;//当天学习 题解列表 2024年10月17日 0 点赞 0 评论 492 浏览 评分:9.9