llllmz

导航

2024年1月25日

KY196 复数集合C

摘要: C的思路就是,先把用数据录入,然后按要求选出最大(用选择排序是最简单的),最后输出。 #include<stdio.h> #include<math.h> struct node{ int a; int b; long sum; }; typedef struct node num; int cha 阅读全文

posted @ 2024-01-25 17:25 神奇的萝卜丝 阅读(33) 评论(0) 推荐(0)

KY196 复数集合C++

摘要: 这题难点就是什么是复数的模了吧。 然后C++写个优先队列(大根堆)+操作符重载就行了。 #include<iostream> #include<string> #include<queue> #include<math.h> using namespace std; struct node{ int 阅读全文

posted @ 2024-01-25 15:36 神奇的萝卜丝 阅读(29) 评论(0) 推荐(0)