The 3n + 1 problem 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include<math.h>int main(){ int a,b; int i = 0; int x; while (scan…… 题解列表 2024年03月05日 1 点赞 0 评论 350 浏览 评分:10.0
简单易懂的解题思路 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i,a[1000],x,y,k; scanf("%d",&n); for(i=0;…… 题解列表 2024年03月05日 0 点赞 0 评论 571 浏览 评分:0.0
简单易懂的解题思路 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,n,i,nu=0,mu=0; scanf("%d%d",&n,&m); for(i…… 题解列表 2024年03月05日 0 点赞 0 评论 469 浏览 评分:9.9
巨巨巨简单的思路但略微巧妙的设计(按题目要求来) 摘要:解题思路:首先该题主要是通过题目描述,大家可以在草稿上以测试数据查看整个过程糖果的变化,这里因为是绕圈循环变化,所以采用数组。会发现:每次分糖果时该小朋友的糖果数为原来小朋友糖果数的一半加下一个小朋友…… 题解列表 2024年03月05日 1 点赞 1 评论 461 浏览 评分:9.9
双向循环链表:C++面向对象 摘要: ###### 参考代码 ```cpp #include using namespace std; struct node { int data; node* …… 题解列表 2024年03月04日 0 点赞 0 评论 464 浏览 评分:9.9
图的遍历-DFS深度优先搜索(C++) 摘要:#include<iostream> using namespace std; #define MAX_VERTEX_NUM 20 // 定义最大结点数 int graph[MAX_VERTEX…… 题解列表 2024年03月04日 0 点赞 0 评论 604 浏览 评分:0.0
滑动窗口+优先队列 Python解法 简洁写法 摘要:可以先把Leetcode上面这题写了[滑动窗口最大值](https://leetcode.cn/problems/sliding-window-maximum/submissions/50760610…… 题解列表 2024年03月04日 0 点赞 0 评论 992 浏览 评分:7.2
编写题解 2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:from math import sqrtimport mathn=int(input())c=[2]num=1while num<=n: for i in ran…… 题解列表 2024年03月04日 0 点赞 0 评论 404 浏览 评分:0.0
2798: 整数序列的元素最大跨度值 摘要:注意事项: 给max和min赋值时注意,一定要让这两个值有改动,否则记录的不是输入的值,max够小,min够大参考代码:#include<iostream> using namespace s…… 题解列表 2024年03月04日 0 点赞 0 评论 571 浏览 评分:0.0
暴力解(抛弃大脑,回归原始) 摘要:解题思路:没学几天算法 不要喷,就是排序之后 放到队列里,然后扫过去注意事项:参考代码:#include<bits/stdc++.h>using namespace std;struct Poin…… 题解列表 2024年03月04日 0 点赞 0 评论 840 浏览 评分:9.9