题解 1234: 检查一个数是否为质数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; for(in…… 题解列表 2024年03月30日 0 点赞 0 评论 235 浏览 评分:9.9
1234: 检查一个数是否为质数(改进速度版) 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n; cin>>n; …… 题解列表 2024年03月30日 0 点赞 0 评论 181 浏览 评分:9.9
绝对值排序(动态内存分配(calloc) 摘要:解题思路:注意事项:参考代码#include<stdio.h>#include<stdlib.h>int main(){ int i,j,n,*p,*t; scanf("%d",&n); while(…… 题解列表 2024年03月30日 0 点赞 0 评论 238 浏览 评分:9.9
2604: 蓝桥杯2021年真题-砝码称重(unordered_set) 摘要:##unordered_set **又学到了一个重要的数据结构!! unordered_set:用于存放无序、不重复的数据(重复数据会被自动过滤) set:用于存放有序、不重复的数据 unor…… 题解列表 2024年03月30日 4 点赞 0 评论 646 浏览 评分:9.9
比较简单的一种方法 摘要:解题思路:先看题目,找出规律注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){ int n,i,cnt=0; long int a[3000]…… 题解列表 2024年03月30日 0 点赞 0 评论 283 浏览 评分:9.9
1347: 八皇后 dfs回溯 摘要:解题思路:dfs注意事项:参考代码:import java.util.Scanner;public class nKingM { static int res = 0; public st…… 题解列表 2024年03月30日 0 点赞 0 评论 481 浏览 评分:9.9
信息学奥赛一本通T1453-移动玩具(广度搜索) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>#include<algorithm>#include<queue>using namespace st…… 题解列表 2024年03月30日 0 点赞 0 评论 322 浏览 评分:9.9
题解 2814: 正常血压 摘要:解题思路:(jinitaimei)注意事项:题目说的是连续的正常次数,还要写个判断参考代码:#include<bits/stdc++.h>using namespace std;int main(){…… 题解列表 2024年03月31日 0 点赞 0 评论 165 浏览 评分:9.9
比较好理解的解法 摘要:解题思路:先求出最大公约数,之后再用两数相乘后比上最大公约数,便可以得到最小公倍数注意事项:第二个返回值注意返回int参考代码:def f(a,b): a,b=max(a,b),min(a,b)…… 题解列表 2024年03月31日 0 点赞 0 评论 257 浏览 评分:9.9
信息学奥赛一本通T1457-Power Strings(KMP算法的最基础,背背背!!!) 摘要:解题思路:char s[N];* 声明一个字符数组 `s`,用于存储输入的字符串。* **main 函数:** * 进入一个循环,不断读取字符串 `s`,直到遇到字符串 `.` 为止。 *…… 题解列表 2024年03月31日 0 点赞 0 评论 363 浏览 评分:9.9