摘要: #include <iostream> #include <string> #include "minecraft.h" using namespace std; TxMinecraft mc; int main(){ bool con=mc.ConnectMinecraft("zk","08bd1 阅读全文
posted @ 2025-08-16 10:02 fushuxuan1 阅读(12) 评论(0) 推荐(0)
摘要: #include <graphics.h> // 引用图形库头文件 #include <conio.h> void sjx(int x,int y,int w){ line(x,y,x+w/2,y+w); line(x,y,x-w/2,y+w); line(x-w/2,y+w,x+w/2,y+w); 阅读全文
posted @ 2025-04-12 09:59 fushuxuan1 阅读(24) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int number=0; class bank{ private: string name; int card; double money; string p; vector<string> log; st 阅读全文
posted @ 2025-03-08 10:01 fushuxuan1 阅读(12) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int main(){ int a[8]; int t,L=0,R=4,M=0; cin>>t; for(int i=0;i<8;i++){ cin>>a[i]; } int x=1000; // 1 2 2 阅读全文
posted @ 2024-11-16 10:03 fushuxuan1 阅读(17) 评论(0) 推荐(0)
摘要: 字符串类: 构造string对象和初始化#include<iostream>#include<string> using namespace std;int main(){ string s;//空串 string s1="hello,hhh";//初始化为hello,hhh string s2(" 阅读全文
posted @ 2024-11-09 08:17 fushuxuan1 阅读(17) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-11-02 09:58 fushuxuan1 阅读(10) 评论(0) 推荐(0)
摘要: 贪心算法基本要素 1.贪心选择性质:通过每个子问题的最优选择,可以得到整个问题的最优解。 意味着,当我们面对一个问题时,我们就可以通过贪心策略来做出局部最优 的选择,最终得到全局最优的解。 2.最优子结构:问题的最优解包含子问题的最优解。意味着,问题可以分解 成若干个子问题,每个子问题可以独立求解, 阅读全文
posted @ 2024-10-19 14:43 fushuxuan1 阅读(32) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; int main(){ int n,x,s_x; cin>>n>>x; int a[n],b[n]; for(int i=0;i<n;i++){ a[i]=i+1; } int j=0,t,d=0; int 阅读全文
posted @ 2024-10-05 08:46 fushuxuan1 阅读(35) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-09-16 09:57 fushuxuan1 阅读(13) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-09-16 08:50 fushuxuan1 阅读(25) 评论(0) 推荐(0)