用筛法求之N内的素数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,sum; cin>>n; fo…… 题解列表 2023年08月08日 0 点赞 0 评论 405 浏览 评分:9.9
超简单连续整数和 一看就懂AC 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; for(int i=1;i<n…… 题解列表 2023年08月08日 0 点赞 0 评论 363 浏览 评分:9.9
简化宏定义求三角形面积 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)/2#define area(a,b,c) sqrt(…… 题解列表 2023年08月08日 1 点赞 0 评论 538 浏览 评分:8.0
字符串的修改1205 摘要:解题思路:公式或者动态规划注意事项:参考代码:一、套公式:最少操作数=长字符串长度-最大公共子串长度#include二、动态规划——WagnerFischer算法#include <stdio.h>#…… 题解列表 2023年08月08日 0 点赞 0 评论 308 浏览 评分:0.0
找最大数简单易懂c宏定义和函数两种 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#define max(a,b,c) a>b?(a>c?a:c):(a<c?(b>c?b:c):b)int main(){ int…… 题解列表 2023年08月08日 0 点赞 0 评论 271 浏览 评分:0.0
输出前k大的数:C++实现 摘要:## 手写快速排序 ```c++ #include #include #include using namespace std; long n; long k; void …… 题解列表 2023年08月08日 0 点赞 0 评论 480 浏览 评分:9.9
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner s 摘要:### 这里必须要使用sc.nextLine(),因为字符串中可能包含有空格,导致不能满分 ``` import java.util.Scanner; public class Main {…… 题解列表 2023年08月08日 0 点赞 0 评论 207 浏览 评分:0.0
保留字母(C) 摘要:解题思路:方法一:删除非字母字符 怎么实现删除呢?将字符串存放在字符数组中,每个字符都有相应的占位,对字符串中每一个字符逐一进行判断,若是非字母字符就将它下一个字符来替换它。参考代码:#incl…… 题解列表 2023年08月09日 0 点赞 0 评论 365 浏览 评分:0.0
双目运算符使用 摘要:#include<stdio.h>int main(){ int a,b,c; scanf("%d%d%d",&a,&b,&c); int max; max = a>b?a:b…… 题解列表 2023年08月09日 0 点赞 0 评论 351 浏览 评分:0.0
倒数第二 C++ stl prev 摘要:## STL prev > std::prev`函数来获取容器中倒数第n个元素的迭代器。`std::prev`函数接受两个参数:迭代器和要向前移动的步数 ```c++ #include …… 题解列表 2023年08月09日 0 点赞 0 评论 525 浏览 评分:0.0