本文分类:news发布日期:2025/11/23 17:27:24
打赏

相关文章

解码网络编程基础

进程间通信方式 基础概念 程序是数据和指令的集合,运行时成为进程,操作系统会为其分配资源并记录参数。同一主机内进程通信可通过管道、信号、消息队列、信号量集、共享内存实现,这些方式依赖主机本地系统资源,无法…

C++的3种继承方式

C++的3种继承方式 在 C++ 中,继承方式(public、protected、private)决定了基类成员在派生类中的访问权限,以及派生类对象对基类成员的访问权限。正确选择继承方式是实现封装、复用和多态的关键。以下是三种继承方式…

1082. Read Number in Chinese (25)

1082. Read Number in Chinese (25)#include <iostream> #include <string.h>using namespace std;int first = 1;void setfirst() {if(first == 1){first = 0;}else{printf(" ");} }int main()…

1081. Rational Sum (20)

1081. Rational Sum (20)#include <iostream>using namespace std;long long getsame(long long a, long long b) {if(b != 0){return getsame(b, a % b);}else{return a;} }void simplify(long long &a, lo…

1067. Sort with Swap(0) (25)

1067. Sort with Swap(0) (25)#include <iostream>using namespace std;int index[100010], num[100010];int main() {int n;scanf("%d", &n);int i, count = 0;for(i = 0; i < n; i++){scanf(…

1066. Root of AVL Tree (25)

1066. Root of AVL Tree (25)#include <iostream> #include <stdlib.h>using namespace std;typedef struct node {int key, bf;struct node *lchild, *rchild; }*bnode;void rrotate(bnode *root) {bnode…

1070. Mooncake (25)

1070. Mooncake (25)#include <iostream> #include <algorithm>using namespace std;struct node {double amounts, prices, perprice; }mooncakes[1010];int cmp(node n1, node n2) {return n1.perprice …

1069. The Black Hole of Numbers (20)

1069. The Black Hole of Numbers (20)#include <iostream> #include <string.h> #include <algorithm>using namespace std;int cmp(char a, char b) {return a > b; }int main() {int num[2];s…

手机版浏览

扫一扫体验

微信公众账号

微信扫一扫加关注

返回
顶部