随笔分类 -  C++

摘要:#include <bits/stdc++.h> using namespace std; void z(vector<int> v,int c){ vector<int> s; int sum=0; for(int k=0;k<v.size()||sum!=0;k++){ sum+=v[k]*c; 阅读全文
posted @ 2024-05-25 09:58 fushuxuan1 阅读(25) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <windows.h> #include <conio.h>//控制台输入输出头文件 using namespace std; int main(){ HANDLE handle=GetStdHandle(STD_OUTPUT_HA 阅读全文
posted @ 2024-05-24 20:29 fushuxuan1 阅读(15) 评论(0) 推荐(0)
摘要:#include <windows.h> //创建窗口程序的步骤: //1.创建winMain()主函数 //2.设计窗口 //3.注册窗口 //4.创建窗口 //5.显示窗口 LRESULT CALLBACK WndProc(HWND hwnd, UINT Message,//消息 WPARAM 阅读全文
posted @ 2024-05-04 15:19 fushuxuan1 阅读(12) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <windows.h> int main(int argc, char** argv){ int a=10; if(MessageBox(NULL,"你在心中想个数字,我来猜","是or不是游戏",MB_OK)==IDOK){ if 阅读全文
posted @ 2024-05-04 10:01 fushuxuan1 阅读(14) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <windows.h> #include <conio.h>//控制台输入输出头文件 using namespace std; int main(){ HANDLE handle=GetStdHandle(STD_OUTPUT_HA 阅读全文
posted @ 2024-04-20 15:59 fushuxuan1 阅读(16) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <windows.h> #include <conio.h>//控制台输入输出头文件 using namespace std; int main(){ HANDLE handle=GetStdHandle(STD_OUTPUT_HA 阅读全文
posted @ 2024-04-13 15:52 fushuxuan1 阅读(10) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <windows.h> #include <conio.h>//控制台输入输出头文件 using namespace std; int main(){ HANDLE handle=GetStdHandle(STD_OUTPUT_HA 阅读全文
posted @ 2024-04-13 15:08 fushuxuan1 阅读(16) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; int main(){ int x,p1=0,p2=0,p3=0; cin>>x; p1=x/4; switch(x%4){ case 1:p1--;p2++;break; case 2:p1--;p3++; 阅读全文
posted @ 2024-04-13 14:32 fushuxuan1 阅读(14) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; int main(){ string n; int i; cin>>n; freopen("in.txt","w",stdout); cout<<n; freopen("in.txt","r",stdin); 阅读全文
posted @ 2024-03-30 09:58 fushuxuan1 阅读(15) 评论(0) 推荐(0)
摘要:int count=0; for (int k=0;k<100;k++){ count++; } cout<<cunt; //程序执行次数:100 //时间复杂度:O(1) int count=0; for(int k=0;k<2*N;k++){ count++; } int M=10; while 阅读全文
posted @ 2024-03-30 08:11 fushuxuan1 阅读(11) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <windows.h> using namespace std; struct book{ string name; float money; string cbs; string writer; int kc; string ty 阅读全文
posted @ 2024-03-17 10:00 fushuxuan1 阅读(20) 评论(0) 推荐(0)
摘要:#include <iostream> #include <stack> using namespace std; int main(){ string a; stack<char> s; cin>>a; for(int i=0;i<a.length();i++){ if(a[i]=='(' || 阅读全文
posted @ 2024-02-19 11:43 fushuxuan1 阅读(10) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; int main(){ int m,n,b=0; cin>>n>>m; queue<int> a; for(int i=1;i<=n;i++){ a.push(i); } while(!a.empty()){ 阅读全文
posted @ 2024-01-31 11:41 fushuxuan1 阅读(7) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> using namespace std; int main(){ int boy=0,girl=0,w=0; cin>>boy>>girl>>w; queue<int> a; queue<int> b; for(int i=1;i<=boy;i++) 阅读全文
posted @ 2024-01-31 11:11 fushuxuan1 阅读(80) 评论(0) 推荐(0)
摘要:#include <iostream> using namespace std; class Box{ private: double length; double width; public: void setLength(double length); void setWidth(double 阅读全文
posted @ 2024-01-27 09:19 fushuxuan1 阅读(6) 评论(0) 推荐(0)
摘要://1 #include <bits/stdc++.h> using namespace std; int main(){ list<int> a={1,2,3,4,5}; list<int> b={6,7,8,9,10}; a.splice(a.end(),b); list<int>::itera 阅读全文
posted @ 2024-01-05 19:42 fushuxuan1 阅读(13) 评论(0) 推荐(0)
摘要:#include <iostream> #include <list>//引入list容器的头文件 #include <algorithm> using namespace std; int main(){ list<int> a; int b[]={1,2,3,4}; list<int> c(b, 阅读全文
posted @ 2023-12-31 10:01 fushuxuan1 阅读(9) 评论(0) 推荐(0)
摘要:1. #include <bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int a[n]={},x,y; for(int i=0;i<n;i++){ cin>>a[i]; } cin>>x; deque<int> b(a 阅读全文
posted @ 2023-12-31 09:44 fushuxuan1 阅读(12) 评论(0) 推荐(0)
摘要:#include <iostream> #include <windows.h> using namespace std; HWND hand=NULL; DWORD pid=0; HANDLE hProcess=NULL; DWORD BaseValue=0; DWORD SunshineAddr 阅读全文
posted @ 2023-12-17 09:24 fushuxuan1 阅读(45) 评论(0) 推荐(0)
摘要:#include <bits/stdc++.h> #include <windows.h> using namespace std; struct Student{ int id;//学号 string name;//姓名 int age;//年龄 int grade;//班级 }s; void z 阅读全文
posted @ 2023-12-16 10:02 fushuxuan1 阅读(26) 评论(0) 推荐(0)