【C++贪心算法】发工资喽 摘要:#前言 本题是一个使用动态规划的经典题目,贪心算法实际上是动态规划的一个特例,动态规划(dp)实际上是把一个问题分成多个子问题进行分步求解,而贪心算法则是一直考虑当下的最优。不去考虑当前的之前,每次…… 文章列表 2023年06月09日 0 点赞 0 评论 253 浏览 评分:0.0
链表dsaddddddddddddddddddddd 摘要:#include<stdio.h>#include<malloc.h>struct no { int ct; struct no *next;};struct no * create(int n) {…… 文章列表 2023年06月13日 0 点赞 0 评论 160 浏览 评分:0.0
2790 分段函数 摘要:#include <bits/stdc++.h>using namespace std;int main(){ double x; cin >>x; if (x>=0&&x<5) …… 文章列表 2023年06月17日 0 点赞 0 评论 134 浏览 评分:0.0
题目 1123: C语言训练-列出最简真分数序列* 摘要:#include<stdio.h> int main(void){ int arr[20]={0}; int i,j=0,num=0,mark; for(i=2;i<40;…… 文章列表 2023年06月18日 0 点赞 0 评论 126 浏览 评分:0.0
快速排序C++ 摘要:```cpp #include #include using namespace std; int part(int* r, int low, int hight) //划分函数 { …… 文章列表 2023年07月05日 0 点赞 0 评论 224 浏览 评分:0.0
归并排序C++ 摘要:```cpp #include #include using namespace std; void merge(vector& nums, int left, int mid, int ri…… 文章列表 2023年07月05日 0 点赞 0 评论 221 浏览 评分:0.0
插入排序C++ 摘要:```cpp #include #include using namespace std; void insert_sort(vector &nums){ int n = nums.…… 文章列表 2023年07月05日 0 点赞 0 评论 212 浏览 评分:0.0
大连交通大学五年制C语言试卷三 考试笔记 摘要:5、在以下给出的表达式中,与do-while(E)语句中的(E)不等价的表达式是( )。答案:B A. (E>0||E<0) B. (E==0) C. (!E…… 文章列表 2023年07月07日 0 点赞 0 评论 158 浏览 评分:0.0
大连交通大学五年制C语言试卷七 考试笔记 摘要:7、在所有函数之前,定义一个外部变量的形式为static int x;那么错误的叙述是( )。正确答案:A A. x的值不可以永久保留 B. 将变量存放在静态存储区 …… 文章列表 2023年07月07日 0 点赞 0 评论 201 浏览 评分:0.0
lrc解析 main.c 1 摘要://main.c#include<stdio.h>#include<ctype.h>#include<stdlib.h>#include<string.h>#include<time.h>#inclu…… 文章列表 2023年07月08日 0 点赞 0 评论 137 浏览 评分:0.0