此为ST模板(有dp) 摘要:解题思路: 就是普通的st表先学习这个就是ST表的模板,学会ST这个就是很简单的注意事项:参考代码:#include#include#include#includeusing namespace st…… 题解列表 2024年08月19日 0 点赞 0 评论 275 浏览 评分:9.9
第几项 最简单的方法 摘要:解题思路:以m>s来判断循环的始终,每轮增加n,然后累加到s即可注意事项:参考代码:int m;int n = 0,s = 0;scanf("%d",&m);while (m>s){ n++; …… 题解列表 2024年08月19日 0 点赞 0 评论 196 浏览 评分:9.9
我们就要设置一个安全的密码,安全密码的检验,easy 摘要:解题思路:yixie c++的字符串基本操作注意事项:bool arr[4] = {true};只会将第一个元素设置为true;参考代码:#include <iostream> #include <…… 题解列表 2024年08月19日 0 点赞 0 评论 209 浏览 评分:0.0
拿捏,已知元素从小到大排列的两个数组x[]和y[],请写出一个程序算出两个数组彼此之间差的绝对值中最小的一个,这叫做数组的距离 摘要:解题思路:输入,迭代器迭代,做差,比较,赋值,输出注意事项:调试信息屏蔽掉参考代码:#include <iostream> #include <vector> #include <cmath> …… 题解列表 2024年08月19日 0 点赞 0 评论 430 浏览 评分:0.0
两个条件——素数、回文 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long int su(int n) { if(…… 题解列表 2024年08月18日 0 点赞 0 评论 248 浏览 评分:9.9
尝试写、找规律 摘要:解题思路:不完全归纳法找规律day1 1day2 2day3 3day4 4--------day5 6 day6 9 day7 13day8 19参考代码:#include<bits/stdc++.…… 题解列表 2024年08月18日 0 点赞 0 评论 159 浏览 评分:0.0
数据结构——递归篇 摘要:解题思路:参考代码:#include<bits/stdc++.h> using namespace std; void move(char a,int n,char c) { cout<<"…… 题解列表 2024年08月17日 1 点赞 0 评论 397 浏览 评分:10.0
素数算法,时间复杂度降低版 摘要:#include<bits/stdc++.h> using namespace std; bool su(int n) { if(n<2) return false; …… 题解列表 2024年08月17日 0 点赞 0 评论 176 浏览 评分:0.0
糖果游戏(循环的拆分) 摘要:解题思路:循环类型的题目一般要寻找一个切入点,我选择的切入点一般为首位,即首位进行特殊操作,中间循环部分进行相似操作。每轮循环开始前先进行平均操作(除以三),以a[0]切入,对a[4],a[1]进行相…… 题解列表 2024年08月17日 1 点赞 0 评论 379 浏览 评分:9.9
大整数的因子 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <stdlib.h> #include <stdio.h> using namespace std; …… 题解列表 2024年08月16日 0 点赞 0 评论 249 浏览 评分:9.9