上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: #include "sqlite3.h" #include <iostream> using namespace std; void cls(){ system("cls"); } void list(){ system("cls"); cout<<" 聊天室 "<<endl; cout<<" 1. 阅读全文
posted @ 2024-12-14 16:05 -刘-j-x- 阅读(18) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; long long m=10000000000000; bool b=false; void j(long long d,int l){ if(l==0){ if(d<m){ m=d; b=true; } }else{ 阅读全文
posted @ 2024-12-14 08:26 -刘-j-x- 阅读(279) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int n,k,j,i,b,_min; vector<string> a; struct p{ int id; string name; vector<int> gx; }; vector<p> list; 阅读全文
posted @ 2024-11-30 10:03 -刘-j-x- 阅读(7) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int n,k,j,i; int a[200001]; int f(int r,int l){ int mid=l+(r-l)/2; if(r<l){ return -1; } if(a[i]-a[mid]= 阅读全文
posted @ 2024-11-29 19:23 -刘-j-x- 阅读(8) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; string a; int b[280]={0}; int fi(char l){ if(l=='*'){ return 2; }else if(l=='+'){ return 1; }else if(l=='/'){ 阅读全文
posted @ 2024-10-25 19:34 -刘-j-x- 阅读(29) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 using namespace std; 3 int main(){ 4 int k; 5 cin>>k; 6 for(int i=0;i<k;i++){ 7 int w,s; 8 double sum=0; 9 cin>>w; 10 cin>>s; 1 阅读全文
posted @ 2024-10-19 15:38 -刘-j-x- 阅读(14) 评论(0) 推荐(0)
摘要: 1.贪心选择性质:通过每个子问题的最优选择,可以得到整个问题的最优解,意味着,当我们面对一个问题时,我们就可以通过贪心策略来做出局部最优选择,最终得到全局最优解 2.最优子结构:问题的最优解包含子问题的最优解。意味着,问题可以分解成若干个问题,每个子问题可以单独求解,并且他们的最优解可以组合成原问题 阅读全文
posted @ 2024-10-19 14:39 -刘-j-x- 阅读(17) 评论(0) 推荐(0)
摘要: 是parse! 阅读全文
posted @ 2024-10-12 19:41 -刘-j-x- 阅读(13) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 using namespace std; 3 int main(){ 4 int n,j=0,t=1,lt=0; 5 cin>>n; 6 while(1){ 7 if((n==1 ||(n+2)%3==0 )&& lt==0){ 8 lt=t; 9 } 阅读全文
posted @ 2024-10-04 20:04 -刘-j-x- 阅读(67) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 using namespace std; 3 int main(){ 4 int n,m; 5 cin>>n>>m; 6 int g=n,t=0,li,s[n+1],b; 7 for(int i=1;i<=n;i++){ 8 s[i]=i; 9 } 1 阅读全文
posted @ 2024-10-04 20:02 -刘-j-x- 阅读(220) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 12 下一页