题解列表

筛选

判断整除(回溯)

摘要:```java import java.util.Scanner; public class Main { static int n, k, plan = 0; stati……

题解 2515: 转圈游戏

摘要:解题思路:注意事项:参考代码:#include <stdio.h>typedef long long LL;LL quick(LL a,LL b,LL m){    if(b==0)        r……

小白,看看就行,不动脑袋

摘要:解题思路:注意事项:参考代码#include<iostream>#include<string>using namespace std;int main(){    string s;    cin>……

和和为为给给定定数数

摘要:解题思路:读取输入后排序,用双指针从两端向中间找和为目标值的数对,根据当前和调整指针参考代码:#include <iostream> #include <vector> #include <alg……

二分法求函数的零点xxxx

摘要:解题思路:利用二分法不断缩小含根区间,根据函数值确定新的区间范围,直到满足精度要求,最后四舍五入得到结果。注意事项:选择合适的循环终止条件,确保计算准确性。参考代码:#include #include……

递归倒置字符组xxxxx

摘要:解题思路:定义递归函数,以首尾字符交换的方式逐步调整字符串,通过不断缩小处理范围实现倒置。在递归过程中,每次交换字符后打印当前字符状态,当范围缩小到只剩一个字符或更少时停止递归。注意事项:1.注意递归……

日期排序(c++代码使用stl库)

摘要:解题思路:用sstream类分割字符串,再用vector容器存储起来,依次比较。注意事项:参考代码:#include<iostream> #include<string> #include<vec……

我AC的第一个难题

摘要:参考代码:#include<bits/stdc++.h>//100以内数的加减 using namespace std; bool jiancha(string s) {     string……