weinan030416

导航

2023年10月29日 #

算法

摘要: 分解自然数之和可重复,乘积最大 #include<bits/stdc++.h> using namespace std; //根据数学知识,分成若干个2和3 int maxn=0; //最大乘积 void find(int num,int cur) { if(cur>maxn){ maxn=cur; 阅读全文

posted @ 2023-10-29 10:04 楠030416 阅读(4) 评论(0) 推荐(0) 编辑

2023年6月11日 #

数据定义

摘要: 创建 表 CREATE TABLE Emp( Eid CHAR(5) NOT NULL, Ename VARCHAR(10), WorkID CHAR(3), Salary NUMERIC(8,2), PHONE CHAR(11) NOT NULL ); NOT NULL非空 VARCHAR(10) 阅读全文

posted @ 2023-06-11 19:29 楠030416 阅读(2) 评论(0) 推荐(0) 编辑

2023年3月28日 #

算法2

摘要: 分考场 #include<bits/stdc++.h> using namespace std; int n,m,total; bool isknow[101][101],ok[101]; int main() { cin>>n>>m; for(int i=0;i<m;i++){ int a,b; 阅读全文

posted @ 2023-03-28 20:28 楠030416 阅读(7) 评论(0) 推荐(0) 编辑

修改数组

摘要: 通过80% #include<bits/stdc++.h> using namespace std; int n,num[100001]; void fun(int i){ bool total[100001]; memset(total,false,sizeof(total)); for(int 阅读全文

posted @ 2023-03-28 20:17 楠030416 阅读(13) 评论(0) 推荐(0) 编辑

算法

摘要: #include<bits/stdc++.h> using namespace std; int N,M,K,T,Time[100],Begin[100],To[100][100][100],Total[100]; bool Have[100]; void dfs(int i,int j,int m 阅读全文

posted @ 2023-03-28 15:27 楠030416 阅读(10) 评论(0) 推荐(0) 编辑

2023年3月27日 #

常用算法

摘要: 三种常见类型:评价、预测、优化 评价 预测 优化 回归算法 规划算法 线性规划 非线性规划 整数规划 分支定界算法 割平面算法 匈牙利算法 综合评价模型 层次分析法 主成分分析 topsis评价 熵权法 分类算法 聚类算法 支持向量机算法 插值算法 马尔可夫链 灰色预测 优化算法 遗传算法 粒子群算 阅读全文

posted @ 2023-03-27 11:49 楠030416 阅读(29) 评论(0) 推荐(0) 编辑

2023年2月18日 #

淹没岛屿

摘要: 5..#####...#.#.......##### 4 0 #include<bits/stdc++.h> using namespace std; bool flag; char a[1010][1010]; int cnt=0,ans=0,rans=0; int n; int dx[4]={1 阅读全文

posted @ 2023-02-18 11:36 楠030416 阅读(14) 评论(0) 推荐(0) 编辑

2023年2月13日 #

第几小

摘要: #include <iostream> #include <vector> #include <cmath> #include <algorithm> using namespace std; int main() { // 请在此输入您的代码 int n; cin>>n; //块长 int len 阅读全文

posted @ 2023-02-13 21:07 楠030416 阅读(21) 评论(0) 推荐(0) 编辑

最大和

摘要: 错误 #include<bits/stdc++.h> using namespace std; const int N = 1e6; int isprime[1000005] = {}; int d(int t)//最小质因数 { for (int i = 1; i <= N; i++)//最大就是 阅读全文

posted @ 2023-02-13 20:51 楠030416 阅读(21) 评论(0) 推荐(0) 编辑

哈希表

摘要: class Solution { public: vector<int> intersect(vector<int>& nums1, vector<int>& nums2) { if (nums1.size() > nums2.size()) { return intersect(nums2, nu 阅读全文

posted @ 2023-02-13 14:45 楠030416 阅读(2) 评论(0) 推荐(0) 编辑