摘要: #include<bits/stdc++.h> using namespace std; int main(){ long long n,k,l,ll=0,rr=100000000; cin>>n>>k; long long a[n]; for(long long i=0;i<n;i++){ cin 阅读全文
posted @ 2024-12-21 09:37 -刘-j-x- 阅读(5) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h> using namespace std; int main(){ long long n,k,l,ll=0,rr=100000000; cin>>n>>k; long long a[n],b[n]; for(long long i=0;i<n;i++) 阅读全文
posted @ 2024-12-21 09:37 -刘-j-x- 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #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- 阅读(13) 评论(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- 阅读(21) 评论(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- 阅读(3) 评论(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- 阅读(5) 评论(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- 阅读(7) 评论(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- 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 1.贪心选择性质:通过每个子问题的最优选择,可以得到整个问题的最优解,意味着,当我们面对一个问题时,我们就可以通过贪心策略来做出局部最优选择,最终得到全局最优解 2.最优子结构:问题的最优解包含子问题的最优解。意味着,问题可以分解成若干个问题,每个子问题可以单独求解,并且他们的最优解可以组合成原问题 阅读全文
posted @ 2024-10-19 14:39 -刘-j-x- 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 是parse! 阅读全文
posted @ 2024-10-12 19:41 -刘-j-x- 阅读(8) 评论(0) 推荐(0) 编辑