[{"data":1,"prerenderedAt":677},["ShallowReactive",2],{"content:\u002F2025\u002Fwust-oj-cpp-reference-code":3,"surround:\u002F2025\u002Fwust-oj-cpp-reference-code":671},{"id":4,"title":5,"body":6,"categories":645,"date":647,"description":648,"draft":649,"extension":650,"image":651,"meta":652,"navigation":654,"path":655,"permalink":655,"published":656,"readingTime":657,"recommend":656,"references":656,"seo":662,"sitemap":663,"stem":664,"tags":665,"type":668,"updated":669,"__hash__":670},"content\u002Fposts\u002F2025\u002Fwustoj-cpp参考代码.md","WUST OJ C++ 参考代码",{"type":7,"value":8,"toc":582},"minimark",[9,18,25,30,35,46,50,56,60,66,70,76,80,86,92,96,102,106,112,116,122,126,132,136,142,146,152,156,162,166,168,174,178,184,188,194,198,202,208,212,218,222,228,232,238,242,248,252,258,262,268,272,278,282,288,292,298,302,308,312,318,322,325,331,335,341,345,351,355,361,365,371,375,381,385,391,395,401,405,411,415,419,425,429,435,439,445,449,455,459,465,469,475,479,485,489,495,499,505,509,515,519,525,529,535,539,547,551,557,561,567,572],[10,11,14],"alert",{"title":12,"type":13},"复制说明","info",[15,16,17],"p",{},"2025.6.19 补充：现在开始我有 wustoj 的管理权限啦，下面提到的出现问题的题面都已更改，如果你有新的发现，欢迎评论指错~\n由于 wustoj 属于闭源项目，无法看到他人提交代码，故在此记录ac 代码，以便大家共同交流~希望你不是直接 CV 大法！",[10,19,22],{"title":20,"type":21},"提交前","warning",[15,23,24],{},"不同批次题面可能会调整类名、函数签名或输出格式。提交前最好再对照一次当前题面。",[26,27,29],"h2",{"id":28},"_1类和对象","1.类和对象",[31,32,34],"h3",{"id":33},"c1001-时钟类-clock-的设计","c++1001 时钟类 Clock 的设计",[36,37,43],"pre",{"className":38,"code":40,"language":41,"meta":42},[39],"language-c++","#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Clock\n{\npublic:\n    Clock()\n    {\n        hour = 8;\n        minute = 16;\n        second = 24;\n    }\n    Clock(int h, int m, int s)\n    {\n        hour = h;\n        minute = m;\n        second = s;\n    }\n    int hour, minute, second;\n    void Show()\n    {\n        cout \u003C\u003C hour \u003C\u003C \":\" \u003C\u003C minute \u003C\u003C \":\" \u003C\u003C second \u003C\u003C endl;\n    }\n    void Set(int hh, int mm, int ss)\n    {\n        hour = hh;\n        minute = mm;\n        second = ss;\n    }\n};\n\n","c++","",[44,45,40],"code",{"__ignoreMap":42},[31,47,49],{"id":48},"c1002-点类-point-的设计","c++1002 点类 Point 的设计",[36,51,54],{"className":52,"code":53,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Point\n{\npublic:\n    Point()\n    {\n        x = 10;\n        y = 16;\n    }\n    Point(int xx, int yy)\n    {\n        x = xx;\n        y = yy;\n    }\n    int x, y;\n    void Show()\n    {\n        cout \u003C\u003C \"(\" \u003C\u003C x \u003C\u003C \",\" \u003C\u003C y \u003C\u003C \")\" \u003C\u003C endl;\n    }\n    void Set(int xxx, int yyy)\n    {\n        x = xxx;\n        y = yyy;\n    }\n};\n\n\n",[44,55,53],{"__ignoreMap":42},[31,57,59],{"id":58},"c1003-圆类-circle-的设计","c++1003 圆类 Circle 的设计",[36,61,64],{"className":62,"code":63,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Circle\n{\npublic:\n    Circle()\n    {\n        radius = 10;\n    }\n    Circle(double r)\n    {\n        radius = r;\n    }\n    double radius;\n    void Set(double r)\n    {\n        radius = r;\n    }\n    double Get()\n    {\n        return radius;\n    }\n    double Circumference()\n    {\n        return (radius * 2 * 3.14);\n    }\n    double Square()\n    {\n        return (radius * radius * 3.14);\n    }\n};\n\n",[44,65,63],{"__ignoreMap":42},[31,67,69],{"id":68},"c1004-矩形类-rectangle-的设计","c++.1004 矩形类 Rectangle 的设计",[36,71,74],{"className":72,"code":73,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Rectangle\n{\npublic:\n    Rectangle()\n    {\n        width = 2;\n        height = 2;\n    }\n    Rectangle(double w, double h)\n    {\n        width = w;\n        height = h;\n    }\n    double width, height;\n    void Set(double w, double h)\n    {\n        width = w;\n        height = h;\n    }\n    double GetWidth()\n    {\n        return width;\n    }\n    double GetHeight()\n    {\n        return height;\n    }\n    double Perimeter()\n    {\n        return (width + height) * 2;\n    }\n    double Area()\n    {\n        return width * height;\n    }\n};\n\n",[44,75,73],{"__ignoreMap":42},[31,77,79],{"id":78},"c1005-复数类-complex-的设计","c++.1005 复数类 Complex 的设计",[36,81,84],{"className":82,"code":83,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Complex\n{\npublic:\n    Complex()\n    {\n        real = 1;\n        imag = 2;\n    }\n    Complex(double r, double i)\n    {\n        real = r;\n        imag = i;\n    }\n    double real, imag;\n    void Show()\n    {\n        if (real == 0 && imag != 0) cout \u003C\u003C imag \u003C\u003C \"i\" \u003C\u003C endl;\n        else if (imag == 0) cout \u003C\u003C real \u003C\u003C endl;\n        else\n        {\n            if (imag > 0) cout \u003C\u003C real \u003C\u003C \"+\" \u003C\u003C imag \u003C\u003C \"i\" \u003C\u003C endl;\n            else cout \u003C\u003C real \u003C\u003C imag \u003C\u003C \"i\" \u003C\u003C endl;\n        }\n    }\n    void Set(double r, double i)\n    {\n        real = r;\n        imag = i;\n    }\n};\n\n",[44,85,83],{"__ignoreMap":42},[36,87,90],{"className":88,"code":89,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\n\u002F\u002F这道题个人认为测试数据有问题！下面给出两段代码，第一段是能够 ac 这题的代码（不过其实是错误的，当虚部为 1 或者-1 时，会表现出 1i 或者-1i。）。第二段代码则是我认为的正解！（估计是测试数据出错了\nclass Complex\n{\npublic:\n    Complex()\n    {\n        real = 1;\n        imag = 2;\n    }\n    Complex(double r, double i)\n    {\n        real = r;\n        imag = i;\n    }\n    double real, imag;\n    void Show()\n    {\n        if (imag == 0) cout \u003C\u003C real \u003C\u003C endl;\n        else if (real == 0 && imag == 1) cout \u003C\u003C \"i\" \u003C\u003C endl;\n        else if (real == 0 && imag == -1) cout \u003C\u003C \"-i\" \u003C\u003C endl;\n        else if (real == 0) cout \u003C\u003C imag \u003C\u003C \"i\" \u003C\u003C endl;\n        else if (imag == 1) cout \u003C\u003C real \u003C\u003C \"+i\" \u003C\u003C endl;\n        else if (imag == -1) cout \u003C\u003C real \u003C\u003C \"-i\" \u003C\u003C endl;\n        else\n        {\n            if (imag > 0) cout \u003C\u003C real \u003C\u003C \"+\" \u003C\u003C imag \u003C\u003C \"i\" \u003C\u003C endl;\n            else cout \u003C\u003C real \u003C\u003C imag \u003C\u003C \"i\" \u003C\u003C endl;\n        }\n    }\n    void Set(double r, double i)\n    {\n        real = r;\n        imag = i;\n    }\n};\n\n",[44,91,89],{"__ignoreMap":42},[31,93,95],{"id":94},"c1006-日期类-date-的设计","c++.1006 日期类 Date 的设计",[36,97,100],{"className":98,"code":99,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Date\n{\npublic:\n    Date()\n    {\n        year = 2015;\n        month = 5;\n        day = 20;\n    }\n    Date(int y, int m, int d)\n    {\n        year = y;\n        month = m;\n        day = d;\n    }\n    int year, month, day;\n    void Show()\n    {\n        cout \u003C\u003C year \u003C\u003C \"-\" \u003C\u003C month \u003C\u003C \"-\" \u003C\u003C day \u003C\u003C endl;\n    }\n    void Set(int y, int m, int d)\n    {\n        year = y;\n        month = m;\n        day = d;\n    }\n    void Set()\n    {\n        year = 2050;\n        month = 12;\n        day = 1;\n    }\n    int GetYear()\n    {\n        return year;\n    }\n    int GetMonth()\n    {\n        return month;\n    }\n    int GetDay()\n    {\n        return day;\n    }\n};\n\n",[44,101,99],{"__ignoreMap":42},[31,103,105],{"id":104},"c1007-学生类-student-的设计","c++.1007 学生类 Student 的设计",[36,107,110],{"className":108,"code":109,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Student\n{\npublic:\n    Student()\n    {\n        id = 10000;\n        name = \"NULL\";\n        score = 0;\n    }\n    Student(int i, string n, int s)\n    {\n        id = i;\n        name = n;\n        score = s;\n    }\n    int id;\n    string name;\n    int score;\n    int GetId()\n    {\n        return id;\n    }\n    string GetName()\n    {\n        return name;\n    }\n    int GetScore()\n    {\n        return score;\n    }\n    void Set(int i, string n, int s)\n    {\n        id = i;\n        name = n;\n        score = s;\n    }\n    void Set()\n    {\n        id = 99999;\n        name = \"NONAME\";\n        score = 100;\n    }\n    void Show()\n    {\n        cout \u003C\u003C id \u003C\u003C \"-\" \u003C\u003C name \u003C\u003C \"-\" \u003C\u003C score \u003C\u003C endl;\n    }\n};\n\n",[44,111,109],{"__ignoreMap":42},[31,113,115],{"id":114},"c1008-线段类-line-的设计","c++.1008 线段类 Line 的设计",[36,117,120],{"className":118,"code":119,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccmath>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Line\n{\npublic:\n    Line()\n    {\n        sx = 0, sy = 0;\n        ex = 0, ey = 0;\n    }\n    Line(double sxx, double syy, double exx, double eyy)\n    {\n        sx = sxx, sy = syy;\n        ex = exx, ey = eyy;\n    }\n    double sx, sy, ex, ey;\n    void Show()\n    {\n        double len = sqrt((sx - ex) * (sx - ex) + (sy - ey) * (sy - ey));\n        cout \u003C\u003C \"(\" \u003C\u003C sx \u003C\u003C \",\" \u003C\u003C sy \u003C\u003C \")--(\" \u003C\u003C ex \u003C\u003C \",\" \u003C\u003C ey \u003C\u003C \")length=\" \u003C\u003C len \u003C\u003C endl;\n    }\n    void Set(double sxx, double syy, double exx, double eyy)\n    {\n        sx = sxx, sy = syy;\n        ex = exx, ey = eyy;\n    }\n    void Set()\n    {\n        sx = 1, sy = 5;\n        ex = 8, ey = 4;\n    }\n};\n\n",[44,121,119],{"__ignoreMap":42},[31,123,125],{"id":124},"c1009-国家类-country-的设计","c++.1009 国家类 Country 的设计",[36,127,130],{"className":128,"code":129,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Country\n{\npublic:\n    Country()\n    {\n        name = \"NULL\";\n        capital = \"NONE\";\n        num = 0;\n    }\n    Country(string n, string c, int nu)\n    {\n        name = n;\n        capital = c;\n        num = nu;\n    }\n    string name, capital;\n    int num;\n    string GetCapital()\n    {\n        return capital;\n    }\n    string GetName()\n    {\n        return name;\n    }\n    int GetPopulation()\n    {\n        return num;\n    }\n    void Set(string n, string c, int nu)\n    {\n        name = n;\n        capital = c;\n        num = nu;\n    }\n    void Set()\n    {\n        name = \"China\";\n        capital = \"Beijing\";\n        num = 1400000000;\n    }\n    void Show()\n    {\n        cout \u003C\u003C name \u003C\u003C \"-\" \u003C\u003C capital \u003C\u003C \"-\" \u003C\u003C num \u003C\u003C endl;\n    }\n};\n\n",[44,131,129],{"__ignoreMap":42},[31,133,135],{"id":134},"c1010-长期存款类-fixed_deposit-的设计","c++.1010 长期存款类 Fixed_Deposit 的设计",[36,137,140],{"className":138,"code":139,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Fixed_Deposit\n{\npublic:\n    Fixed_Deposit()\n    {\n        amount = 10000.00;\n        rate = 0.0330;\n        year = 1;\n    }\n    Fixed_Deposit(double a, double r, int y)\n    {\n        amount = a;\n        rate = r;\n        year = y;\n    }\n    double amount, rate;\n    int year;\n    void Show()\n    {\n        double total = amount * rate * year + amount;\n        cout \u003C\u003C \"amount=\" \u003C\u003C amount \u003C\u003C \"  rate=\" \u003C\u003C rate * 100 \u003C\u003C \"%  years=\" \u003C\u003C year \u003C\u003C \"  total=\" \u003C\u003C total \u003C\u003C endl;\n    }\n    void Set(double a, double r, int y)\n    {\n        amount = a;\n        rate = r;\n        year = y;\n    }\n    double GetAmount()\n    {\n        return amount;\n    }\n    double GetRate()\n    {\n        return rate;\n    }\n    int GetYears()\n    {\n        return year;\n    }\n    double GetAll()\n    {\n        double total = amount * rate * year + amount;\n        return total;\n    }\n};\n\n",[44,141,139],{"__ignoreMap":42},[31,143,145],{"id":144},"c1011-书类-book-的设计","c++.1011 书类 Book 的设计",[36,147,150],{"className":148,"code":149,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Book\n{\npublic:\n    Book()\n    {\n        author = \"NONE\";\n        title = \"NULL\";\n        price = 0.00;\n    }\n    Book(string a, string t, double p)\n    {\n        author = t;\n        title = a;\n        price = p;\n    }\n    string author;\n    string title;\n    double price;\n    void Set(string a, string t, double p)\n    {\n        author = t;\n        title = a;\n        price = p;\n    }\n    void Show()\n    {\n        cout \u003C\u003C title \u003C\u003C \"，\" \u003C\u003C author \u003C\u003C \"，\" \u003C\u003C price \u003C\u003C endl;\n    }\n    void Set()\n    {\n        author = \"同济大学数学系\";\n        title = \"高等数学(第七版)上册\";\n        price = 37.70;\n    }\n    string GetAuthor()\n    {\n        return author;\n    }\n    string GetTitle()\n    {\n        return title;\n    }\n    double GetPrice()\n    {\n        return price;\n    }\n};\n\n",[44,151,149],{"__ignoreMap":42},[31,153,155],{"id":154},"c1012-建筑物类-building-的设计","c++.1012 建筑物类 building 的设计",[36,157,160],{"className":158,"code":159,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Building\n{\npublic:\n    Building()\n    {\n        name = \"NULL\";\n        height = 0.00;\n        floors = 0;\n    }\n    Building(string n, double h, int f)\n    {\n        name = n;\n        height = h;\n        floors = f;\n    }\n    string name;\n    int floors;\n    double height;\n    void Set(string n, double h, int f)\n    {\n        name = n;\n        height = h;\n        floors = f;\n    }\n    void Set()\n    {\n        name = \"None\";\n        height = 20.00;\n        floors = 7;\n    }\n    void Show()\n    {\n        \u002F\u002Fcout \u003C\u003C fixed\u003C\u003C setprecision(2);\n        cout \u003C\u003C name \u003C\u003C \"--\" \u003C\u003C height \u003C\u003C \"米--\" \u003C\u003C floors \u003C\u003C \"层\" \u003C\u003C endl;\n    }\n    string GetName()\n    {\n        return name;\n    }\n    double GetHeight()\n    {\n        return height;\n    }\n    int GetFloors()\n    {\n        return floors;\n    }\n};\n\n",[44,161,159],{"__ignoreMap":42},[31,163,165],{"id":164},"c1013-课程类-course-的设计","c++.1013 课程类 Course 的设计",[31,167],{"id":42},[36,169,172],{"className":170,"code":171,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\n\nclass Course\n{\npublic:\n    Course()\n    {\n        id = 0;\n        name = \"NULL\";\n        credit = 0;\n    }\n    Course(int i, string n, int c)\n    {\n        id = i;\n        name = n;\n        credit = c;\n    }\n    int id;\n    string name;\n    int credit;\n    void Show()\n    {\n        cout \u003C\u003C id \u003C\u003C \"\u002F\" \u003C\u003C name \u003C\u003C \"\u002F\" \u003C\u003C credit \u003C\u003C endl;\n    }\n    void Set(int i, string n, int c)\n    {\n        id = i;\n        name = n;\n        credit = c;\n    }\n    void Set()\n    {\n        id = 9999999;\n        name = \"None\";\n        credit = 10000;\n    }\n    int GetId()\n    {\n        return id;\n    }\n    string GetName()\n    {\n        return name;\n    }\n    int GetCredit()\n    {\n        return credit;\n    }\n};\n\n",[44,173,171],{"__ignoreMap":42},[31,175,177],{"id":176},"c1014-实验室类-laboratory-的设计","c++.1014 实验室类 Laboratory 的设计",[36,179,182],{"className":180,"code":181,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Laboratory\n{\npublic:\n    Laboratory(int r, int n, string s)\n    {\n        room_num = r;\n        num = n;\n        name = s;\n    }\n    Laboratory()\n    {\n        room_num = 0;\n        num = 0;\n        name = \"NULL\";\n    }\n    int room_num;\n    int num;\n    string name;\n    void Set(int r, int n, string s)\n    {\n        room_num = r;\n        num = n;\n        name = s;\n    }\n    void Set()\n    {\n        room_num = 99999;\n        num = 1000;\n        name = \"None\";\n    }\n    void Show()\n    {\n        cout \u003C\u003C room_num \u003C\u003C \"\u002F\" \u003C\u003C num \u003C\u003C \"\u002F\" \u003C\u003C name \u003C\u003C endl;\n    }\n    int GetRoom_no()\n    {\n        return room_num;\n    }\n    int GetCapacity()\n    {\n        return num;\n    }\n    string GetName()\n    {\n        return name;\n    }\n};\n\n\n",[44,183,181],{"__ignoreMap":42},[31,185,187],{"id":186},"c1015-个人-person-类的设计","c++.1015 个人 Person 类的设计",[36,189,192],{"className":190,"code":191,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Person\n{\npublic:\n    Person(string n, string s, int a)\n    {\n        name = n;\n        sex = s;\n        age = a;\n    }\n    Person()\n    {\n        name = \"NULL\";\n        sex = \"NO\";\n        age = 0;\n    }\n    string name;\n    string sex;\n    int age;\n    void Set(string n, string s, int a)\n    {\n        name = n;\n        sex = s;\n        age = a;\n    }\n    void Set()\n    {\n        name = \"Unknown\";\n        sex = \"FM\";\n        age = 1000;\n    }\n    void Show()\n    {\n        cout \u003C\u003C name \u003C\u003C \",\" \u003C\u003C sex \u003C\u003C \",\" \u003C\u003C age \u003C\u003C endl;\n    }\n    string GetName()\n    {\n        return name;\n    }\n    string GetSex()\n    {\n        return sex;\n    }\n    int GetAge()\n    {\n        return age;\n    }\n};\n\n",[44,193,191],{"__ignoreMap":42},[26,195,197],{"id":196},"_2运算符重载","2.运算符重载",[31,199,201],{"id":200},"c2001-时间类运算符重载","c++.2001 时间类运算符重载",[36,203,206],{"className":204,"code":205,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Time\n{\npublic:\n    Time()\n    {\n        hour = 1;\n        minute = 2;\n        second = 3;\n    }\n    Time(int h, int m, int s)\n    {\n        hour = h;\n        minute = m;\n        second = s;\n      \tnormalize();\n    }\n    int hour, minute, second;\n    void Set(int hh, int mm, int ss)\n    {\n        hour = hh;\n        minute = mm;\n        second = ss;\n        normalize();\n    }\n    void normalize()\n    {\n        minute += second \u002F 60;\n        second %= 60;\n        if (second \u003C 0)\n        {\n            second += 60;\n            minute--;\n        }\n        hour += minute \u002F 60;\n        minute %= 60;\n        if (minute \u003C 0)\n        {\n            minute += 60;\n            hour--;\n        }\n        while (hour \u003C 0)\n        {\n            hour += 24;\n        }\n        hour %= 24;\n    }\n};\nostream& operator\u003C\u003C (ostream& cout, Time& t)\n{\n    cout \u003C\u003C t.hour \u003C\u003C \":\" \u003C\u003C t.minute \u003C\u003C \":\" \u003C\u003C t.second;\n    return cout;\n}\nlong long operator- (Time& t1, Time& t2)\n{\n    long long s1 = t1.hour * 3600 + t1.minute * 60 + t1.second;\n    long long s2 = t2.hour * 3600 + t2.minute * 60 + t2.second;\n    return (s1 - s2);\n}\nTime operator+ (Time& t1, int s)\n{\n    Time t2 = t1;\n    t2.second += s;\n    t2.normalize();\n    return t2;\n}\nTime operator- (Time& t1, int s)\n{\n    return t1 + (-s);\n}\n\n",[44,207,205],{"__ignoreMap":42},[31,209,211],{"id":210},"c2002-日期类运算符重载","c++.2002 日期类运算符重载",[36,213,216],{"className":214,"code":215,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Date\n{\npublic:\n    Date()\n    {\n        year = 2023;\n        month = 5;\n        day = 20;\n    }\n    Date(int y, int m, int d)\n    {\n        year = y;\n        month = m;\n        day = d;\n        normalize();\n    }\n    int year, month, day;\n    int mp[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n    int mr[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n    bool isr(int y)\n    {\n        return (y % 400 == 0) || (y % 100 != 0 && y % 4 == 0);\n    }\n    long long tianshu()\n    {\n        long long num = 0;\n        for (int y = 1; y \u003C year; y++)\n        {\n            num += isr(y) ? 366 : 365;\n        }\n        for (int m = 1; m \u003C month; m++)\n        {\n            if (isr(year)) num += mr[m];\n            else num += mp[m];\n        }\n        num += day;\n        return num;\n    }\n    void normalize()\n    {\n        while (day > (isr(year) ? mr[month] : mp[month]))\n        {\n            day -= (isr(year) ? mr[month] : mp[month]);\n            month++;\n            if (month > 12)\n            {\n                month = 1;\n                year++;\n            }\n        }\n        while (day \u003C 1)\n        {\n            month--;\n            if (month \u003C 1)\n            {\n                month = 12;\n                year--;\n            }\n            day += (isr(year) ? mr[month] : mp[month]);\n        }\n    }\n    void Set(int y, int m, int d)\n    {\n        year = y;\n        month = m;\n        day = d;\n        normalize();\n    }\n    long long operator- (Date& d)\n    {\n        return tianshu() - d.tianshu();\n    }\n    Date operator+ (int n)\n    {\n        Date tmp = *this;\n        tmp.day += n;\n        tmp.normalize();\n        return tmp;\n    }\n    Date operator- (int n)\n    {\n        return *this + (-n);\n    }\n};\nostream& operator\u003C\u003C (ostream& cout, Date& d)\n{\n    cout \u003C\u003C d.year \u003C\u003C \"\u002F\" \u003C\u003C d.month \u003C\u003C \"\u002F\" \u003C\u003C d.day;\n    return cout;\n}\n\n",[44,217,215],{"__ignoreMap":42},[31,219,221],{"id":220},"c2003-复数类运算符重载","c++.2003 复数类运算符重载",[36,223,226],{"className":224,"code":225,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Complex\n{\npublic:\n    Complex()\n    {\n        real = 0;\n        imag = 0;\n    }\n    Complex(double r, double i)\n    {\n        real = r;\n        imag = i;\n    }\n    double real, imag;\n    void Set(double r, double i)\n    {\n        real = r;\n        imag = i;\n    }\n    Complex operator+ (Complex c)\n    {\n        Complex tmp = *this;\n        tmp.real += c.real;\n        tmp.imag += c.imag;\n        return tmp;\n    }\n    Complex operator- (Complex c)\n    {\n        Complex tmp = *this;\n        tmp.real -= c.real;\n        tmp.imag -= c.imag;\n        return tmp;\n    }\n    Complex operator* (Complex c)\n    {\n        Complex tmp;\n        tmp.real = this->real * c.real - this->imag * c.imag;\n        tmp.imag = this->real * c.imag + this->imag * c.real;\n        return tmp;\n    }\n};\nostream& operator\u003C\u003C (ostream& cout, Complex& c)\n{\n    if (c.imag == 0) cout \u003C\u003C c.real;\n    else if (c.real == 0 && c.imag == 1) cout \u003C\u003C \"i\";\n    else if (c.real == 0 && c.imag == -1) cout \u003C\u003C \"-i\";\n    else if (c.real == 0) cout \u003C\u003C c.imag \u003C\u003C \"i\";\n    else if (c.imag == 1) cout \u003C\u003C c.real \u003C\u003C \"+i\";\n    else if (c.imag == -1) cout \u003C\u003C c.real \u003C\u003C \"-i\";\n    else\n    {\n        if (c.imag > 0) cout \u003C\u003C c.real \u003C\u003C \"+\" \u003C\u003C c.imag \u003C\u003C \"i\";\n        else cout \u003C\u003C c.real \u003C\u003C c.imag \u003C\u003C \"i\";\n    }\n    return cout;\n}\n\n",[44,227,225],{"__ignoreMap":42},[31,229,231],{"id":230},"c2004-学生类运算符重载","c++.2004 学生类运算符重载",[36,233,236],{"className":234,"code":235,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Student\n{\npublic:\n    int id;\n    string name;\n    int score;\n    bool operator> (Student s)\n    {\n        if (this->score == s.score) return this->id > s.id;\n        else return this->score > s.score;\n    }\n};\nistream& operator>> (istream& cin, Student& s)\n{\n    cin >> s.id >> s.name >> s.score;\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Student& s)\n{\n    cout \u003C\u003C \"id=\" \u003C\u003C s.id \u003C\u003C \",name=\" \u003C\u003C s.name \u003C\u003C \",score=\" \u003C\u003C s.score;\n    return cout;\n}\n\n",[44,237,235],{"__ignoreMap":42},[31,239,241],{"id":240},"c2005-短整数类运算符重载","c++.2005 短整数类运算符重载",[36,243,246],{"className":244,"code":245,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\n\u002F\u002F本题在定义除法运算符号时，题目没有说明当 除数 为 0 时，应该返回什么来表明无意义计算。但这是应该注意的事情！\nclass SmallInt\n{\npublic:\n    int val;\n    void normalize()\n    {\n        while (val > 127) val -= 256;\n        while (val \u003C -128) val += 256;\n    }\n    SmallInt operator+ (SmallInt s)\n    {\n        SmallInt tmp = *this;\n        tmp.val += s.val;\n        tmp.normalize();\n        return tmp;\n    }\n    SmallInt operator- (SmallInt s)\n    {\n        SmallInt tmp = *this;\n        tmp.val -= s.val;\n        tmp.normalize();\n        return tmp;\n    }\n    SmallInt operator* (SmallInt s)\n    {\n        SmallInt tmp = *this;\n        tmp.val *= s.val;\n        tmp.normalize();\n        return tmp;\n    }\n    SmallInt operator\u002F (SmallInt s)\n    {\n        if (s.val == 0) cout \u003C\u003C \"题目不严谨。。。\";\n        SmallInt tmp = *this;\n        tmp.val \u002F= s.val;\n        tmp.normalize();\n        return tmp;\n    }\n};\nistream& operator>> (istream& cin, SmallInt& s)\n{\n    cin >> s.val;\n    s.normalize();\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, SmallInt& s)\n{\n    cout \u003C\u003C s.val;\n    return cout;\n}\n\n",[44,247,245],{"__ignoreMap":42},[31,249,251],{"id":250},"c2006-个人-person-类运算符重载","c++.2006 个人 Person 类运算符重载",[36,253,256],{"className":254,"code":255,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Person\n{\npublic:\n    string name = \"NULL\";\n    int age = 0;\n    double GetAge()\n    {\n        return (double)age;\n    }\n    Person operator+ (Person p)\n    {\n        Person tmp = *this;\n        tmp.age += p.age;\n        return tmp;\n    }\n};\nistream& operator>> (istream& cin, Person& s)\n{\n    cin >> s.name >> s.age;\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Person& s)\n{\n    cout \u003C\u003C \"name=\" \u003C\u003C s.name \u003C\u003C \",age=\" \u003C\u003C s.age;\n    return cout;\n}\n\n\n",[44,257,255],{"__ignoreMap":42},[31,259,261],{"id":260},"c2007-圆类运算符重载","c++.2007 圆类运算符重载",[36,263,266],{"className":264,"code":265,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Circle\n{\npublic:\n    Circle()\n    {\n        radius = 0.00000;\n        area = 0.00000;\n    }\n    double radius;\n    double area;\n    double GetArea()\n    {\n        return area;\n    }\n    Circle operator+ (Circle c)\n    {\n        Circle tmp = *this;\n        tmp.area += 3.14159 * c.radius * c.radius;\n        return tmp;\n    }\n};\nistream& operator>> (istream& cin, Circle& s)\n{\n    cin >> s.radius;\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Circle& s)\n{\n    cout \u003C\u003C \"radius=\" \u003C\u003C s.radius \u003C\u003C \",area=\" \u003C\u003C 3.14159 * s.radius * s.radius;\n    return cout;\n}\n\n",[44,267,265],{"__ignoreMap":42},[31,269,271],{"id":270},"c2008-分数类运算符重载","c++.2008 分数类运算符重载",[36,273,276],{"className":274,"code":275,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Fraction {\npublic:\n    int znum;\n    int mnum;\n    int gcd(int a, int b) {\n        return b == 0 ? a : gcd(b, a % b);\n    }\n    void yue() {\n        if (mnum \u003C 0) {\n            znum *= -1;\n            mnum *= -1;\n        }\n        int g = gcd(abs(znum), abs(mnum));\n        znum \u002F= g;\n        mnum \u002F= g;\n        return;\n    }\n    Fraction operator+ (Fraction f) {\n        Fraction tmp;\n        tmp.mnum = this->mnum * f.mnum;\n        tmp.znum = this->znum * f.mnum + this->mnum * f.znum;\n        tmp.yue();\n        return tmp;\n    }\n    Fraction operator- (Fraction f) {\n        Fraction tmp;\n        tmp.mnum = this->mnum * f.mnum;\n        tmp.znum = this->znum * f.mnum - this->mnum * f.znum;\n        tmp.yue();\n        return tmp;\n    }\n    Fraction operator* (Fraction f) {\n        Fraction tmp = *this;\n        tmp.znum *= f.znum;\n        tmp.mnum *= f.mnum;\n        tmp.yue();\n        return tmp;\n    }\n    Fraction operator\u002F (Fraction f) {\n        Fraction tmp = *this;\n        tmp.znum *= f.mnum;\n        tmp.mnum *= f.znum;\n        tmp.yue();\n        return tmp;\n    }\n};\nistream& operator>> (istream& cin, Fraction& s) {\n    cin >> s.znum >> s.mnum;\n    s.yue();\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Fraction& s) {\n    cout \u003C\u003C s.znum \u003C\u003C \"\u002F\" \u003C\u003C s.mnum;\n    return cout;\n}\n\n",[44,277,275],{"__ignoreMap":42},[31,279,281],{"id":280},"c2009-整型动态数组类及运算符重载","c++,2009 整型动态数组类及运算符重载",[36,283,286],{"className":284,"code":285,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass ARRAY {\nprivate:\n    int* p;\n    int len;\n\npublic:\n    friend ostream& operator\u003C\u003C (ostream& cout, ARRAY& s);\n    friend istream& operator>> (istream& cin, ARRAY& s);\n    ARRAY (int n) {\n        len = n;\n        p = new int[n];\n        for (int i = 0; i \u003C n; i++) {\n            p[i] = 0;\n        }\n    }\n    ~ARRAY () {\n        delete[] p;\n    }\n    int& operator[] (int i) {\n        return p[i];\n    }\n    int* operator+ (int i) {\n        return p + i;\n    }\n};\nostream& operator\u003C\u003C (ostream& cout, ARRAY& s) {\n    cout \u003C\u003C \"length=\" \u003C\u003C s.len \u003C\u003C \",element={\";\n    for (int i = 0; i \u003C s.len; i++) {\n        cout \u003C\u003C s[i];\n        if (i != s.len - 1) {\n            cout \u003C\u003C \",\";\n        }\n    }\n    cout \u003C\u003C \"}\";\n    return cout;\n}\n\n",[44,287,285],{"__ignoreMap":42},[31,289,291],{"id":290},"c2010-分数类运算符重载2","c++.2010 分数类运算符重载（2）",[36,293,296],{"className":294,"code":295,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Fraction {\npublic:\n    int znum;\n    int mnum;\n    int gcd(int a, int b) {\n        return b == 0 ? a : gcd(b, a % b);\n    }\n    void yue() {\n        if (znum == 0) {\n            mnum = 1;\n            return;\n        }\n        if (mnum \u003C 0) {\n            znum *= -1;\n            mnum *= -1;\n        }\n        int g = gcd(abs(znum), abs(mnum));\n        znum \u002F= g;\n        mnum \u002F= g;\n        return;\n    }\n    bool operator> (Fraction f) {\n        return (znum * f.mnum > mnum * f.znum);\n    }\n};\nistream& operator>> (istream& cin, Fraction& s) {\n    cin >> s.znum >> s.mnum;\n    s.yue();\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Fraction& s) {\n    cout \u003C\u003C s.znum \u003C\u003C \"\u002F\" \u003C\u003C s.mnum;\n    return cout;\n}\n\n",[44,297,295],{"__ignoreMap":42},[31,299,301],{"id":300},"c2011-圆类-运算符重载2","c++.2011 圆类 运算符重载（2）",[36,303,306],{"className":304,"code":305,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Circle {\npublic:\n    double radius;\n    Circle& operator= (double r) {\n        radius = r;\n        return *this;\n    }\n    bool operator> (Circle a) {\n        return radius > a.radius;\n    }\n};\nostream& operator\u003C\u003C (ostream& cout, Circle& s) {\n    cout \u003C\u003C \"radius=\" \u003C\u003C s.radius \u003C\u003C \",area=\" \u003C\u003C 3.14159 * s.radius * s.radius;\n    return cout;\n}\n\n",[44,307,305],{"__ignoreMap":42},[31,309,311],{"id":310},"c2012-矩形类运算符重载","c++.2012 矩形类运算符重载",[36,313,316],{"className":314,"code":315,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Rectangle {\npublic:\n    double width, height;\n    bool operator> (Rectangle& a) {\n        return (width * height > a.height * a.width);\n    }\n};\nistream& operator>> (istream& cin, Rectangle& a) {\n    cin >> a.width >> a.height;\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Rectangle& a) {\n    cout \u003C\u003C \"width=\" \u003C\u003C a.width \u003C\u003C \" height=\" \u003C\u003C a.height \u003C\u003C \" area=\" \u003C\u003C a.width * a.height;\n    return cout;\n}\n\n",[44,317,315],{"__ignoreMap":42},[31,319,321],{"id":320},"c2013-日期类运算符重载2","c++.2013 日期类运算符重载（2）",[15,323,324],{},"这里的题干。。。。。。。。。",[36,326,329],{"className":327,"code":328,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Date {\npublic:\n    int year, month, day;\n    int mp[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n    int mr[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n    bool isr(int y) {\n        return (y % 400 == 0) || (y % 100 != 0 && y % 4 == 0);\n    }\n    void normalize() {\n        while (day > (isr(year) ? mr[month] : mp[month])) {\n            day -= (isr(year) ? mr[month] : mp[month]);\n            month++;\n            if (month > 12) {\n                month = 1;\n                year++;\n            }\n        }\n        while (day \u003C 1) {\n            month--;\n            if (month \u003C 1) {\n                month = 12;\n                year--;\n            }\n            day += (isr(year) ? mr[month] : mp[month]);\n        }\n    }\n    bool operator> (Date d) {\n        if (year != d.year) {\n            return year > d.year;\n        }\n        if (month != d.month) {\n            return month > d.month;\n        }\n        return day > d.day;\n    }\n};\nistream& operator>> (istream& cin, Date& d) {\n    cin >> d.year >> d.month >> d.day;\n    d.normalize();\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Date& d)\n{\n    cout \u003C\u003C d.year \u003C\u003C \"\u002F\" \u003C\u003C d.month \u003C\u003C \"\u002F\" \u003C\u003C d.day;\n    return cout;\n}\n\n",[44,330,328],{"__ignoreMap":42},[31,332,334],{"id":333},"c2014-时间类运算符重载2","c++.2014 时间类运算符重载（2）",[36,336,339],{"className":337,"code":338,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Time {\npublic:\n    int hour;\n    int minute;\n    int second;\n    void normalize() {\n        minute += second \u002F 60;\n        second %= 60;\n        if (second \u003C 0) {\n            second += 60;\n            minute--;\n        }\n        hour += minute \u002F 60;\n        minute %= 60;\n        if (minute \u003C 0) {\n            minute += 60;\n            hour--;\n        }\n        while (hour \u003C 0){\n            hour += 24;\n        }\n        hour %= 24;\n    }\n    bool operator> (Time t) {\n        if (hour != t.hour) {\n            return hour > t.hour;\n        }\n        if (minute != t.minute) {\n            return minute > t.minute;\n        }\n        return second > t.second;\n    }\n    Time& operator= (int x) {\n        hour = x \u002F 3600;\n        x %= 3600;\n        minute = x \u002F 60;\n        second = x % 60;\n        normalize();\n        return *this;\n    }\n};\nostream& operator\u003C\u003C (ostream& cout, Time& d) {\n    cout \u003C\u003C d.hour \u003C\u003C \":\" \u003C\u003C d.minute \u003C\u003C \":\" \u003C\u003C d.second;\n    return cout;\n}\n\n",[44,340,338],{"__ignoreMap":42},[31,342,344],{"id":343},"c2015-字符串-string-运算符重载","c++.2015 字符串 string 运算符重载",[36,346,349],{"className":347,"code":348,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass CSTRING {\nprivate:\n    char* p = nullptr;\npublic:\n    friend ostream& operator\u003C\u003C (ostream& cout, CSTRING& c);\n    friend istream& operator>> (istream& cin, CSTRING& c);\n    CSTRING& operator= (CSTRING& c) {\n        delete[] p;\n        p = new char[strlen(c.p) + 1];\n        strcpy(p, c.p);\n        return *this;\n    }\n    bool operator> (CSTRING c) {\n        return strcmp(p, c.p) > 0;\n    }\n};\nistream& operator>> (istream& cin, CSTRING& c) {\n    string tmp;\n    cin >> tmp;\n    delete[] c.p;\n    c.p = new char [tmp.length() + 1];\n    strcpy(c.p, tmp.c_str());\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, CSTRING& c) {\n    cout \u003C\u003C c.p;\n    return cout;\n}\n\n",[44,350,348],{"__ignoreMap":42},[31,352,354],{"id":353},"c2016-字符串-string-运算符重载2","c++.2016 字符串 string 运算符重载（2）",[36,356,359],{"className":357,"code":358,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass CSTRING {\nprivate:\n    char* p = nullptr;\npublic:\n    ~CSTRING() {\n        if (p != nullptr) {\n            delete[] p;\n        }\n    }\n    friend ostream& operator\u003C\u003C (ostream& cout, CSTRING& c);\n    friend istream& operator>> (istream& cin, CSTRING& c);\n    CSTRING& operator=(CSTRING& c) {\n        if (this == &c) return *this;\n        delete[] p;\n        if (c.p != nullptr) {\n            p = new char[strlen(c.p) + 1];\n            strcpy(p, c.p);\n        } else {\n            p = nullptr;\n        }\n        return *this;\n    }\n    CSTRING& operator+= (CSTRING& c) {\n        if (c.p == nullptr) {\n            return *this;\n        }\n        if (p == nullptr) {\n            *this = c;\n            return *this;\n        }\n        char* tmp = new char[strlen(c.p) + strlen(p) + 1];\n        strcpy(tmp, p);\n        strcat(tmp, c.p);\n        delete[] p;\n        p = tmp;\n        return *this;\n    }\n};\nistream& operator>> (istream& cin, CSTRING& c) {\n    string tmp;\n    cin >> tmp;\n    delete[] c.p;\n    c.p = new char [tmp.length() + 1];\n    strcpy(c.p, tmp.c_str());\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, CSTRING& c) {\n    cout \u003C\u003C c.p;\n    return cout;\n}\n\n",[44,360,358],{"__ignoreMap":42},[31,362,364],{"id":363},"c2017-矩形类运算符重载2","c++.2017 矩形类运算符重载（2）",[36,366,369],{"className":367,"code":368,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Rectangle {\npublic:\n    double width, height;\n    bool operator> (Rectangle& a) {\n        return (width * height > a.height * a.width);\n    }\n};\ndouble operator+ (double s, Rectangle& a) {\n    return (s + a.width * a.height);\n}\nistream& operator>> (istream& cin, Rectangle& a) {\n    cin >> a.width >> a.height;\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Rectangle& a) {\n    cout \u003C\u003C \"width=\" \u003C\u003C a.width \u003C\u003C \",height=\" \u003C\u003C a.height \u003C\u003C \",area=\" \u003C\u003C a.width * a.height;\n    return cout;\n}\n\n",[44,370,368],{"__ignoreMap":42},[31,372,374],{"id":373},"c2018-复数类运算符重载2","c++.2018 复数类运算符重载（2）",[36,376,379],{"className":377,"code":378,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccmath>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Complex {\npublic:\n    double real;\n    double imag;\n    bool operator> (Complex c) {\n        return real * real + imag * imag > c.real * c.real + c.imag * c.imag;\n    }\n    Complex& operator= (Complex c) {\n        real = c.real;\n        imag = c.imag;\n        return *this;\n    }\n};\nistream& operator>> (istream& cin, Complex& a) {\n    cin >> a.real >> a.imag;\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Complex& c) {\n    cout \u003C\u003C \"Modulus=\" \u003C\u003C sqrt(c.real * c.real + c.imag * c.imag) \u003C\u003C \"(\";\n    if (c.imag == 0) cout \u003C\u003C c.real;\n    else if (c.real == 0 && c.imag == 1) cout \u003C\u003C \"i\";\n    else if (c.real == 0 && c.imag == -1) cout \u003C\u003C \"-i\";\n    else if (c.real == 0) cout \u003C\u003C c.imag \u003C\u003C \"i\";\n    else if (c.imag == 1) cout \u003C\u003C c.real \u003C\u003C \"+i\";\n    else if (c.imag == -1) cout \u003C\u003C c.real \u003C\u003C \"-i\";\n    else {\n        if (c.imag > 0) cout \u003C\u003C c.real \u003C\u003C \"+\" \u003C\u003C c.imag \u003C\u003C \"i\";\n        else cout \u003C\u003C c.real \u003C\u003C c.imag \u003C\u003C \"i\";\n    }\n    cout \u003C\u003C \")\";\n    return cout;\n}\n\n",[44,380,378],{"__ignoreMap":42},[31,382,384],{"id":383},"c2019-学生类运算符重载2","c++.2019 学生类运算符重载（2）",[36,386,389],{"className":387,"code":388,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Student\n{\npublic:\n    int id;\n    string name;\n    int score;\n    bool operator> (Student s)\n    {\n        if (this->score == s.score) return this->id > s.id;\n        else return this->score > s.score;\n    }\n};\nint operator+ (int a, Student s) {\n    return a + s.score;\n}\nistream& operator>> (istream& cin, Student& s)\n{\n    cin >> s.id >> s.name >> s.score;\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Student& s)\n{\n    cout \u003C\u003C \"id=\" \u003C\u003C s.id \u003C\u003C \",name=\" \u003C\u003C s.name \u003C\u003C \",score=\" \u003C\u003C s.score;\n    return cout;\n}\n\n",[44,390,388],{"__ignoreMap":42},[31,392,394],{"id":393},"c2020-个人-person-类运算符重载2","c++.2020 个人 Person 类运算符重载（2）",[36,396,399],{"className":397,"code":398,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\n#include\u003Ciomanip>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Person {\npublic:\n    string name = \"NULL\";\n    int age = 0;\n    bool operator> (Person p) {\n        if (age != p.age) {\n            return age > p.age;\n        }\n        return name > p.name;\n    }\n    Person& operator= (Person p) {\n        name = p.name;\n        age = p.age;\n        return *this;\n    }\n};\nistream& operator>> (istream& cin, Person& s) {\n    cin >> s.name >> s.age;\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, Person& s) {\n    cout \u003C\u003C \"name=\" \u003C\u003C s.name \u003C\u003C \",age=\" \u003C\u003C s.age;\n    return cout;\n}\n\n",[44,400,398],{"__ignoreMap":42},[31,402,404],{"id":403},"ccstring-类的设计","c++.CSTRING 类的设计",[36,406,409],{"className":407,"code":408,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F* 你提交的代码在这里 *\u002F\nclass CSTRING {\npublic:\n     char* p = nullptr;\n     ~CSTRING() {\n        if (p != nullptr) {\n            delete[] p;\n        }\n     }\n     CSTRING() {\n        p = nullptr;\n     }\n     CSTRING(const CSTRING& other) {\n        p = new char[strlen(other.p)+1];\n        strcpy(p, other.p);\n     }\n     const char* GetData() const{\n        return p ? p : \"\";\n     }\n     void Set (const char* s) {\n        if (p != nullptr) {\n            delete[] p;\n        }\n        p = new char[strlen(s) + 1];\n        strcpy(p, s);\n     }\n     void Show() const{\n        cout \u003C\u003C p \u003C\u003C endl;\n     }\n     CSTRING& operator= (const char* s) {\n        if (p != nullptr) {\n            delete[] p;\n        }\n        p = new char[strlen(s) + 1];\n        strcpy(p, s);\n        return *this;\n     }\n\n     CSTRING& operator= (const CSTRING& c) {\n        if (p != nullptr) {\n            delete[] p;\n        }\n        p = new char[strlen(c.p) + 1];\n        strcpy(p, c.p);\n        return *this;\n     }\n     CSTRING& operator+= (const CSTRING& c) {\n        const char* tt = p ? p : \"\";\n        char* tmp = new char[strlen(c.p) + strlen(tt) + 1];\n        strcpy(tmp, tt);\n        strcat(tmp, c.p);\n        if (p != nullptr) {\n            delete[] p;\n        }\n        p = tmp;\n        return *this;\n     }\n     bool operator> (const CSTRING& c) {\n        return strcmp(this->p, c.p) > 0;\n     }\n     CSTRING operator+ (const CSTRING& c) {\n        CSTRING tmp;\n        if (c.p == nullptr) {\n            return *this;\n        }\n        tmp.p = new char[strlen(c.p) + strlen(p) + 1];\n        strcpy(tmp.p, p);\n        strcat(tmp.p, c.p);\n        return tmp;\n     }\n     char& operator[] (int i) {\n        return p[i];\n     }\n};\nistream& operator>> (istream& cin, CSTRING& c) {\n    string tmp;\n    cin >> tmp;\n    if (c.p != nullptr) {\n        delete[] c.p;\n    }\n    c.p = new char[tmp.length() + 1];\n    strcpy(c.p, tmp.c_str());\n    return cin;\n}\nostream& operator\u003C\u003C (ostream& cout, CSTRING& c) {\n    cout \u003C\u003C (c.p ? c.p : \"\");\n    return cout;\n}\n\n",[44,410,408],{"__ignoreMap":42},[26,412,414],{"id":413},"_3继承与派生","3.继承与派生",[31,416,418],{"id":417},"c3001-日期类由时间类派生","c++.3001 日期类（由时间类派生）",[36,420,423],{"className":421,"code":422,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass CTime {\nprivate:\n    int hour;\n    int minute;\n    int second;\npublic:\n    CTime() {\n        hour = 9;\n        minute = 10;\n        second = 11;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    CTime(int h, int mi, int s) {\n        hour = h;\n        minute = mi;\n        second = s;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    CTime(const CTime& c) {\n        hour = c.hour;\n        minute = c.minute;\n        second = c.second;\n        cout \u003C\u003C \"Function #0 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C hour \u003C\u003C \":\" \u003C\u003C minute \u003C\u003C \":\" \u003C\u003C second \u003C\u003C endl;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n};\nclass CDate : public CTime {\nprivate:\n    int year;\n    int month;\n    int day;\npublic:\n    CDate() {\n        year = 2023;\n        month = 4;\n        day = 5;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    CDate(int y, int m, int d) {\n        year = y;\n        month = m;\n        day = d;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    CDate(int y, int m, int d, int h, int mi, int s) : CTime(h, mi, s) {\n        year = y;\n        month = m;\n        day = d;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    CDate(int y, int m, int d, CTime& t) : CTime(t) {\n        year = y;\n        month = m;\n        day = d;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    CDate(CTime& t) : CTime(t) {\n        year = 2000;\n        month = 12;\n        day = 31;\n        cout \u003C\u003C \"Function #8 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C year \u003C\u003C \"-\" \u003C\u003C month \u003C\u003C \"-\" \u003C\u003C day \u003C\u003C \" \";\n        CTime::Show();\n        cout \u003C\u003C \"Function #9 is called!\" \u003C\u003C endl;\n    }\n};\n\n",[44,424,422],{"__ignoreMap":42},[31,426,428],{"id":427},"c3002-圆类由-point-点类派生","c++.3002 圆类（由 Point 点类派生）",[36,430,433],{"className":431,"code":432,"language":41,"meta":42},[39],"#include\u003Ciostream>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass Point {\nprivate:\n    int x, y;\npublic:\n    Point() : x(19), y(210) {\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Point(int xx, int yy) : x(xx), y(yy) {\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    Point(const Point& p) : x(p.x), y(p.y) {\n        cout \u003C\u003C \"Function #0 is called!\" \u003C\u003C endl;\n    }\n    void Show() const{\n        cout \u003C\u003C \"(\" \u003C\u003C x \u003C\u003C ',' \u003C\u003C y \u003C\u003C \")\" \u003C\u003C endl;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n};\n\nclass Circle : public Point {\nprivate:\n    int radius;\npublic:\n    Circle() : radius(135) {\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Circle(int xx, int yy) : Point(xx, yy), radius(777) {\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Circle(int xx, int yy, int rr) : Point(xx, yy), radius(rr) {\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Circle(const Point& p0, int rr) : Point(p0), radius(rr) {\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    Circle(const Point& p0) : Point(p0), radius(111) {\n        cout \u003C\u003C \"Function #8 is called!\" \u003C\u003C endl;\n    }\n    Circle(int rr) : Point(5, 20), radius(rr) {\n        cout \u003C\u003C \"Function #9 is called!\" \u003C\u003C endl;\n    }\n    void Show() const{\n        cout \u003C\u003C \"Radius=\" \u003C\u003C radius \u003C\u003C \",Center=\";\n        Point :: Show();\n        cout \u003C\u003C \"Function #10 is called!\" \u003C\u003C endl;\n    }\n};\n\n",[44,434,432],{"__ignoreMap":42},[31,436,438],{"id":437},"c3003computer-计算机类由-cpu-类派生","c++.3003Computer 计算机类（由 CPU 类派生）",[36,440,443],{"className":441,"code":442,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\n\u002F\u002F你提交的代码在这里\nclass CPU {\nprivate:\n    string fy, ty;\npublic:\n    CPU() : fy(\"Unknown\"), ty(\"Unknown\") {\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    CPU(string a, string b) : fy(a), ty(b) {\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    CPU(const CPU& tmp) : fy(tmp.fy), ty(tmp.ty) {\n        \u002F\u002Fcout \u003C\u003C \"Function #0 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C fy \u003C\u003C \" \" \u003C\u003C ty \u003C\u003C endl;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n};\nclass Computer : public CPU {\nprivate:\n    string brand, type;\n    int ram, price;\npublic:\n    Computer() : brand(\"None\"), type(\"None\"), ram(0), price(0) {\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Computer(string a, string b, int r, int p, string c, string d) : CPU(c, d), brand(a), type(b), ram(r), price(p) {\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Computer(string a, string b, int r, int p, const CPU& tmp) : CPU(tmp), brand(a), type(b), ram(r), price(p) {\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Computer(string a, string b, int r, int p) : brand(a), type(b), ram(r), price(p) {\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    Computer(const CPU& tmp) : CPU(tmp), brand(\"None\"), type(\"None\"), ram(0), price(0) {\n        cout \u003C\u003C \"Function #8 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"Brand:\" \u003C\u003C brand \u003C\u003C \" Type:\" \u003C\u003C type \u003C\u003C \" Memory:\" \u003C\u003C ram \u003C\u003C \" Price:\" \u003C\u003C price;\n        cout \u003C\u003C \" CPU:\";\n        CPU :: Show();\n        cout \u003C\u003C \"Function #9 is called!\" \u003C\u003C endl;\n    }\n};\n\n",[44,444,442],{"__ignoreMap":42},[31,446,448],{"id":447},"c3004province-省类由-country-国家类派生","c++.3004Province 省类（由 Country 国家类派生）",[36,450,453],{"className":451,"code":452,"language":41,"meta":42},[39],"class Country {\nprotected:\n    char name[40];\n    char capital[40];\n    int population;\npublic:\n    Country() {\n        strcpy(name, \"Noname\");\n        strcpy(capital, \"Unknown\");\n        population = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Country(const char* n, const char* c, int p) {\n        strcpy(name, n);\n        strcpy(capital, c);\n        population = p;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C name \u003C\u003C \"(Capital:\" \u003C\u003C capital \u003C\u003C \" population:\" \u003C\u003C population \u003C\u003C \")\" \u003C\u003C endl;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n};\n\nclass Province : public Country {\nprivate:\n    char provName[40];\n    char provCapital[40];\n    int provPopulation;\npublic:\n    Province() {\n        strcpy(provName, \"None\");\n        strcpy(provCapital, \"None\");\n        provPopulation = 0;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Province(const char* pn, const char* pc, int pp, const char* cn, const char* cc, int cp) : Country(cn, cc, cp) {\n        strcpy(provName, pn);\n        strcpy(provCapital, pc);\n        provPopulation = pp;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Province(const char* pn, const char* pc, int pp, const Country& c) : Country(c) {\n        strcpy(provName, pn);\n        strcpy(provCapital, pc);\n        provPopulation = pp;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Province(const char* pn, const char* pc, int pp) {\n        strcpy(provName, pn);\n        strcpy(provCapital, pc);\n        provPopulation = pp;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    Province(const Country& c) : Country(c) {\n        strcpy(provName, \"None\");\n        strcpy(provCapital, \"None\");\n        provPopulation = 0;\n        cout \u003C\u003C \"Function #8 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C provName \u003C\u003C \":provincial capital(\" \u003C\u003C provCapital \u003C\u003C \"),population(\" \u003C\u003C provPopulation \u003C\u003C \"),Country:\";\n        Country::Show();\n        cout \u003C\u003C \"Function #9 is called!\" \u003C\u003C endl;\n    }\n};\n",[44,454,452],{"__ignoreMap":42},[31,456,458],{"id":457},"c3005rectangle-矩形类由-point-点类派生","c++3005Rectangle 矩形类（由 Point 点类派生）",[36,460,463],{"className":461,"code":462,"language":41,"meta":42},[39],"class Point {\nprotected:\n    int X;\n    int Y;\npublic:\n    Point() {\n        X = 0;\n        Y = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Point(int x, int y) {\n        X = x;\n        Y = y;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"(\" \u003C\u003C X \u003C\u003C \",\" \u003C\u003C Y \u003C\u003C \")\" \u003C\u003C endl;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n};\n\nclass Rectangle : public Point {\nprivate:\n    int width;\n    int height;\npublic:\n    Rectangle():Point(6,7) {\n        width = 0;\n        height = 0;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Rectangle(int x, int y, int w, int h) : Point(x, y) {\n        width = w;\n        height = h;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Rectangle(Point p, int w, int h) : Point(p) {\n        width = w;\n        height = h;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Rectangle(int w, int h):Point(100,110) {\n        width = w;\n        height = h;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    Rectangle(Point p) : Point(p) {\n        width = 10;\n        height = 11;\n        cout \u003C\u003C \"Function #8 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"Width=\" \u003C\u003C width \u003C\u003C \" Height=\" \u003C\u003C height \u003C\u003C \" Left_Up=\";\n        Point::Show();\n        cout \u003C\u003C \"Function #9 is called!\" \u003C\u003C endl;\n    }\n};\n",[44,464,462],{"__ignoreMap":42},[31,466,468],{"id":467},"c3006three_dimensional-三维坐标类由-point-点类派生","c++.3006Three_dimensional 三维坐标类（由 Point 点类派生）",[36,470,473],{"className":471,"code":472,"language":41,"meta":42},[39],"class Point {\nprotected:\n    int x;\n    int y;\npublic:\n    Point() {\n        x = 0;\n        y = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Point(int x, int y) {\n        this->x = x;\n        this->y = y;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"(\" \u003C\u003C x \u003C\u003C \",\" \u003C\u003C y \u003C\u003C \")\" \u003C\u003C endl;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n};\n\nclass Three_dimensional : public Point {\nprivate:\n    int z;\npublic:\n    Three_dimensional() {\n        z = 0;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Three_dimensional(int x, int y, int z) : Point(x, y) {\n        this->z = z;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Three_dimensional(Point p, int z) : Point(p) {\n        this->z = z;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Three_dimensional(int z):Point(100,210) {\n        this->z = z;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    Three_dimensional(Point p) : Point(p) {\n        z = 11;\n        cout \u003C\u003C \"Function #8 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"(\" \u003C\u003C x \u003C\u003C \",\" \u003C\u003C y \u003C\u003C \",\" \u003C\u003C z \u003C\u003C \")\" \u003C\u003C endl;\n        cout \u003C\u003C \"Function #9 is called!\" \u003C\u003C endl;\n    }\n};\n",[44,474,472],{"__ignoreMap":42},[31,476,478],{"id":477},"c3007person-人员类由-cdate-日期类派生","c++.3007Person 人员类（由 CDate 日期类派生）",[36,480,483],{"className":481,"code":482,"language":41,"meta":42},[39],"class CDate {\nprotected:\n    int year;\n    int month;\n    int day;\npublic:\n    CDate() {\n        year = 2023;\n        month = 6;\n        day = 17;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    CDate(int y, int m, int d) {\n        year = y;\n        month = m;\n        day = d;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C year \u003C\u003C \"-\" \u003C\u003C month \u003C\u003C \"-\" \u003C\u003C day \u003C\u003C endl;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n};\n\nclass Person : public CDate {\nprivate:\n    char name[40];\n    int score;\npublic:\n    Person() {\n        strcpy(name, \"Unknown\");\n        score = 0;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Person(const char* n, int s, int y, int m, int d) : CDate(y, m, d) {\n        strcpy(name, n);\n        score = s;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Person(const char* n, int s, const CDate& d) : CDate(d) {\n        strcpy(name, n);\n        score = s;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Person(const char* n, int s) :CDate(2000,12,31){\n        strcpy(name, n);\n        score = s;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    Person(const CDate& d) : CDate(d) {\n        strcpy(name, \"Unknown\");\n        score = 0;\n        cout \u003C\u003C \"Function #8 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"Name:\" \u003C\u003C name \u003C\u003C \"  score:\" \u003C\u003C score \u003C\u003C \" birthday:\";\n        CDate::Show();\n        cout \u003C\u003C \"Function #9 is called!\" \u003C\u003C endl;\n    }\n};\n",[44,484,482],{"__ignoreMap":42},[31,486,488],{"id":487},"c3008teacher-教师类由-person-人员类派生","c++.3008Teacher 教师类（由 Person 人员类派生）",[36,490,493],{"className":491,"code":492,"language":41,"meta":42},[39],"class Person {\nprotected:\n    char name[40];\n    char sex[3];\n    int age;\npublic:\n    Person() {\n        strcpy(name, \"Unknown\");\n        strcpy(sex, \"No\");\n        age = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Person(const char* n, const char* s, int a) {\n        strcpy(name, n);\n        strcpy(sex, s);\n        age = a;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" SEX:\" \u003C\u003C sex \u003C\u003C \" AGE:\" \u003C\u003C age \u003C\u003C endl;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n};\n\nclass Teacher : public Person {\nprivate:\n    char title[40];\n    int pay;\npublic:\n    Teacher() {\n        strcpy(title, \"NONE\");\n        pay = 0;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Teacher(const char* n, const char* s, int a, const char* t, int p) : Person(n, s, a) {\n        strcpy(title, t);\n        pay = p;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Teacher(const Person& p, const char* t, int p2) : Person(p) {\n        strcpy(title, t);\n        pay = p2;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Teacher(const char* t, int p) {\n        strcpy(title, t);\n        pay = p;\n        strcpy(name, \"Unknown\");\n        strcpy(sex, \"No\");\n        age = 0;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    Teacher(const Person& p) : Person(p) {\n        strcpy(title, \"NONE\");\n        pay = 0;\n        cout \u003C\u003C \"Function #8 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" SEX:\" \u003C\u003C sex \u003C\u003C \" AGE:\" \u003C\u003C age \u003C\u003C \" TITLE:\" \u003C\u003C title \u003C\u003C \" PAY:\" \u003C\u003C pay \u003C\u003C endl;\n        cout \u003C\u003C \"Function #9 is called!\" \u003C\u003C endl;\n    }\n};\n",[44,494,492],{"__ignoreMap":42},[31,496,498],{"id":497},"c3009student-学生类由-person-人员类派生","c++.3009Student 学生类（由 Person 人员类派生）",[36,500,503],{"className":501,"code":502,"language":41,"meta":42},[39],"class Person {\nprotected:\n    char name[40];\n    char sex[3];\n    int age;\npublic:\n    Person() {\n        strcpy(name, \"Unknown\");\n        strcpy(sex, \"No\");\n        age = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Person(const char* n, const char* s, int a) {\n        strcpy(name, n);\n        strcpy(sex, s);\n        age = a;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" SEX:\" \u003C\u003C sex \u003C\u003C \" AGE:\" \u003C\u003C age \u003C\u003C endl;\n    }\n};\n\nclass Student : public Person {\nprivate:\n    char Class[40];\n    char major[40];\n    int score;\npublic:\n    Student() {\n        strcpy(Class, \"NONE\");\n        strcpy(major, \"NONE\");\n        score = 100;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n    Student(const char* n, const char* s, int a, const char* c, const char* m, int sc) : Person(n, s, a) {\n        strcpy(Class, c);\n        strcpy(major, m);\n        score = sc;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Student(const Person& p, const char* c, const char* m, int sc) : Person(p) {\n        strcpy(Class, c);\n        strcpy(major, m);\n        score = sc;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Student(const char* c, const char* m, int sc) {\n        strcpy(Class, c);\n        strcpy(major, m);\n        score = sc;\n        strcpy(name, \"Unknown\");\n        strcpy(sex, \"No\");\n        age = 0;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Student(const Person& p) : Person(p) {\n        strcpy(Class, \"NONE\");\n        strcpy(major, \"NONE\");\n        score = 100;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" SEX:\" \u003C\u003C sex \u003C\u003C \" AGE:\" \u003C\u003C age\n            \u003C\u003C \" CLASS:\" \u003C\u003C Class \u003C\u003C \" MAJOR:\" \u003C\u003C major \u003C\u003C \" SCORE:\" \u003C\u003C score \u003C\u003C endl;\n    }\n};\n",[44,504,502],{"__ignoreMap":42},[31,506,508],{"id":507},"c3010dog-狗类由-mammal-哺乳动物类派生","c++.3010Dog 狗类（由 Mammal 哺乳动物类派生）",[36,510,513],{"className":511,"code":512,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\nclass Mammal {\nprotected:\n    int age;\n    int weight;\npublic:\n    Mammal() {\n        age = 0;\n        weight = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Mammal(int a, int w) {\n        age = a;\n        weight = w;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"AGE:\" \u003C\u003C age \u003C\u003C \" WEIGHT:\" \u003C\u003C weight \u003C\u003C \"kg\" \u003C\u003C endl;\n    }\n};\n\nclass Dog : public Mammal {\nprivate:\n    char name[40];\n    int color;\npublic:\n    Dog() {\n        strcpy(name, \"Unknown\");\n        color = 1;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n    Dog(const char* n, int a, int w, int c) : Mammal(a, w) {\n        strcpy(name, n);\n        color = c;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Dog(const Mammal& m, const char* n, int c) : Mammal(m) {\n        strcpy(name, n);\n        color = c;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Dog(const char* n, int c) {\n        strcpy(name, n);\n        color = c;\n        age = 0;\n        weight = 0;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Dog(const Mammal& m) : Mammal(m) {\n        strcpy(name, \"NoName\");\n        color = 2;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" COLOR:\" \u003C\u003C color \u003C\u003C \" AGE:\" \u003C\u003C age \u003C\u003C \" WEIGHT:\" \u003C\u003C weight \u003C\u003C \"kg\" \u003C\u003C endl;\n    }\n};\n",[44,514,512],{"__ignoreMap":42},[31,516,518],{"id":517},"c3011sofa-沙发类由-furniture-家具类派生","c++.3011Sofa 沙发类（由 Furniture 家具类派生）",[36,520,523],{"className":521,"code":522,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Cstring>\nusing namespace std;\n\nclass Furniture {\nprotected:\n    string nat;\n    int price;\npublic:\n    Furniture() {\n        nat = \"Unknown\";\n        price = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Furniture(string m, int p) {\n        nat = m;\n        price = p;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"MATERIAL:\" \u003C\u003C nat \u003C\u003C \"\u002FPRICE:\" \u003C\u003C price \u003C\u003C endl;\n    }\n};\n\nclass Sofa : public Furniture {\nprivate:\n    int seats;\npublic:\n    Sofa() {\n        seats = 2;\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n    Sofa(string m, int p, int s) : Furniture(m, p) {\n        seats = s;\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Sofa(const Furniture& f, int s) : Furniture(f) {\n        seats = s;\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Sofa(int s) {\n        seats = s;\n        nat = \"Unknown\";\n        price = 0;\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Sofa(const Furniture& f) : Furniture(f) {\n        seats = 5;\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    void Show() const {\n        cout \u003C\u003C \"SEATS:\" \u003C\u003C seats \u003C\u003C \"\u002FMATERIAL:\" \u003C\u003C nat \u003C\u003C \"\u002FPRICE:\" \u003C\u003C price \u003C\u003C endl;\n    }\n};\n",[44,524,522],{"__ignoreMap":42},[31,526,528],{"id":527},"c3012bed-床类由-furniture-家具类派生","c++.3012Bed 床类（由 Furniture 家具类派生）",[36,530,533],{"className":531,"code":532,"language":41,"meta":42},[39],"#include\u003Ciostream>\n#include\u003Cstring>\nusing namespace std;\n\nclass Furniture {\nprivate:\n    string nat;\n    int price;\npublic:\n    Furniture() : nat(\"Unknown\"), price(0) {\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Furniture(string mat, int p) : nat(mat), price(p) {\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C \"MATERIAL:\" \u003C\u003C nat \u003C\u003C \"\u002FPRICE:\" \u003C\u003C price \u003C\u003C endl;\n    }\n    string getNat() const { return nat; }\n    int getPrice() const { return price; }\n};\n\nclass Bed : public Furniture {\nprivate:\n    string bedtype;\npublic:\n    Bed() : bedtype(\"NONE\") {\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n    Bed(string mat, int p, string type) : Furniture(mat, p), bedtype(type) {\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Bed(const Furniture& fur, string type) : Furniture(fur), bedtype(type) {\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Bed(string type) : bedtype(type) {\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Bed(const Furniture& fur) : Furniture(fur), bedtype(\"unknown\") {\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C \"BedType:\" \u003C\u003C bedtype \u003C\u003C \"\u002F\";\n        Furniture::Show();\n    }\n};\n",[44,534,532],{"__ignoreMap":42},[31,536,538],{"id":537},"c3013alarmclock-闹钟类由-clock-钟表类派生","c++.3013AlarmClock 闹钟类（由 Clock 钟表类派生）",[36,540,545],{"className":541,"code":543,"language":544,"meta":42},[542],"language-C++","class Clock {\nprotected:\n    int hour;\n    int minute;\n    int second;\npublic:\n    Clock() : hour(0), minute(0), second(0) {\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Clock(int h, int m, int s) : hour(h), minute(m), second(s) {\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C \"Current Time:\" \u003C\u003C hour \u003C\u003C \":\" \u003C\u003C minute \u003C\u003C \":\" \u003C\u003C second \u003C\u003C endl;\n    }\n    int getHour() const { return hour; }\n    int getMinute() const { return minute; }\n    int getSecond() const { return second; }\n};\n\nclass AlarmClock : public Clock {\nprivate:\n    int on;\n    int AlarmHour;\n    int AlarmMinute;\npublic:\n    AlarmClock() : on(0), AlarmHour(8), AlarmMinute(10) {\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n    AlarmClock(int h, int m, int s, int o, int ah, int am) : Clock(h, m, s), on(o), AlarmHour(ah), AlarmMinute(am) {\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    AlarmClock(const Clock& c, int o, int ah, int am) : Clock(c), on(o), AlarmHour(ah), AlarmMinute(am) {\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    AlarmClock(int o, int ah, int am) : Clock(1, 2, 3), on(o), AlarmHour(ah), AlarmMinute(am) {\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    AlarmClock(const Clock& c) : Clock(c), on(0), AlarmHour(1), AlarmMinute(2) {\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C \"Current Time:\" \u003C\u003C hour \u003C\u003C \":\" \u003C\u003C minute \u003C\u003C \":\" \u003C\u003C second \u003C\u003C \" AlarmTime:\" \u003C\u003C AlarmHour \u003C\u003C \":\" \u003C\u003C AlarmMinute;\n        if (on == 1) {\n            cout \u003C\u003C \" AlarmClock on\" \u003C\u003C endl;\n        }\n        else {\n            cout \u003C\u003C \" AlarmClock off\" \u003C\u003C endl;\n        }\n    }\n};\n","C++",[44,546,543],{"__ignoreMap":42},[31,548,550],{"id":549},"c3014doctor-医生类由-person-人员类派生","c++.3014Doctor 医生类（由 Person 人员类派生）",[36,552,555],{"className":553,"code":554,"language":544,"meta":42},[542],"class Person {\nprotected:\n    char name[40];\n    char sex[3];\n    int age;\npublic:\n    Person() {\n        strcpy(name, \"Unknown\");\n        strcpy(sex, \"No\");\n        age = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Person(const char* n, const char* s, int a) {\n        strcpy(name, n);\n        strcpy(sex, s);\n        age = a;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" SEX:\" \u003C\u003C sex \u003C\u003C \" AGE:\" \u003C\u003C age \u003C\u003C endl;\n    }\n    const char* getName() const { return name; }\n    const char* getSex() const { return sex; }\n    int getAge() const { return age; }\n};\n\nclass Doctor : public Person {\nprivate:\n    char specialty[40];\n    int office_visit_fee;\npublic:\n    Doctor() : office_visit_fee(10000) {\n        strcpy(specialty, \"NONE\");\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n    Doctor(const char* n, const char* s, int a, const char* sp, int fee) : Person(n, s, a), office_visit_fee(fee) {\n        strcpy(specialty, sp);\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Doctor(const Person& p, const char* sp, int fee) : Person(p), office_visit_fee(fee) {\n        strcpy(specialty, sp);\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Doctor(const char* sp, int fee) : office_visit_fee(fee) {\n        strcpy(specialty, sp);\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Doctor(const Person& p) : Person(p), office_visit_fee(20) {\n        strcpy(specialty, \"None\");\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" SEX:\" \u003C\u003C sex \u003C\u003C \" AGE:\" \u003C\u003C age \u003C\u003C \" SPECIALTY:\" \u003C\u003C specialty \u003C\u003C \" OFFICE_VISIT_FEE:\" \u003C\u003C office_visit_fee \u003C\u003C endl;\n    }\n};\n",[44,556,554],{"__ignoreMap":42},[31,558,560],{"id":559},"c3015employee-雇员类由-person-人员类派生","c++.3015Employee 雇员类（由 Person 人员类派生）",[36,562,565],{"className":563,"code":564,"language":544,"meta":42},[542],"#include\u003Ciostream>\n#include\u003Ccstring>\nusing namespace std;\n\nclass Person {\nprotected:\n    char name[40];\n    int gender;\n    int age;\npublic:\n    Person() {\n        strcpy(name, \"Unknown\");\n        gender = -1;\n        age = 0;\n        cout \u003C\u003C \"Function #1 is called!\" \u003C\u003C endl;\n    }\n    Person(const char* n, int g, int a) {\n        strcpy(name, n);\n        gender = g;\n        age = a;\n        cout \u003C\u003C \"Function #2 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" GENDER:\";\n        if (gender == 1) {\n            cout \u003C\u003C \"male\";\n        } else if (gender == 0) {\n            cout \u003C\u003C \"female\";\n        } else {\n            cout \u003C\u003C \"blank\";\n        }\n        cout \u003C\u003C \" AGE:\" \u003C\u003C age \u003C\u003C endl;\n    }\n    const char* getName() const { return name; }\n    int getGender() const { return gender; }\n    int getAge() const { return age; }\n};\n\nclass Employee : public Person {\nprivate:\n    char department[40];\n    int salary;\npublic:\n    Employee() : salary(99999999) {\n        strcpy(department, \"NONE\");\n        cout \u003C\u003C \"Function #3 is called!\" \u003C\u003C endl;\n    }\n    Employee(const char* n, int g, int a, const char* d, int s) : Person(n, g, a), salary(s) {\n        strcpy(department, d);\n        cout \u003C\u003C \"Function #4 is called!\" \u003C\u003C endl;\n    }\n    Employee(const Person& p, const char* d, int s) : Person(p), salary(s) {\n        strcpy(department, d);\n        cout \u003C\u003C \"Function #5 is called!\" \u003C\u003C endl;\n    }\n    Employee(const char* d, int s) : salary(s) {\n        strcpy(department, d);\n        cout \u003C\u003C \"Function #6 is called!\" \u003C\u003C endl;\n    }\n    Employee(const Person& p) : Person(p), salary(100000000) {\n        strcpy(department, \"unknown\");\n        cout \u003C\u003C \"Function #7 is called!\" \u003C\u003C endl;\n    }\n    void Show() {\n        cout \u003C\u003C \"NAME:\" \u003C\u003C name \u003C\u003C \" GENDER:\";\n        if (gender == 1) {\n            cout \u003C\u003C \"male\";\n        } else if (gender == 0) {\n            cout \u003C\u003C \"female\";\n        } else {\n            cout \u003C\u003C \"blank\";\n        }\n        cout \u003C\u003C \" AGE:\" \u003C\u003C age \u003C\u003C \"DEPARTMENT:\" \u003C\u003C department \u003C\u003C \" SALARY:\" \u003C\u003C salary \u003C\u003C endl;\n    }\n};\n",[44,566,564],{"__ignoreMap":42},[568,569,571],"h1",{"id":570},"至此完结撒花","至此！完结撒花~",[15,573,574,575],{},"代码编写者： ",[576,577,581],"a",{"href":578,"rel":579},"https:\u002F\u002Fdocs.scandidreams.top\u002F",[580],"nofollow","shoper",{"title":42,"searchDepth":583,"depth":583,"links":584},4,[585,605,628],{"id":28,"depth":586,"text":29,"children":587},2,[588,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604],{"id":33,"depth":589,"text":34},3,{"id":48,"depth":589,"text":49},{"id":58,"depth":589,"text":59},{"id":68,"depth":589,"text":69},{"id":78,"depth":589,"text":79},{"id":94,"depth":589,"text":95},{"id":104,"depth":589,"text":105},{"id":114,"depth":589,"text":115},{"id":124,"depth":589,"text":125},{"id":134,"depth":589,"text":135},{"id":144,"depth":589,"text":145},{"id":154,"depth":589,"text":155},{"id":164,"depth":589,"text":165},{"id":42,"depth":589,"text":42},{"id":176,"depth":589,"text":177},{"id":186,"depth":589,"text":187},{"id":196,"depth":586,"text":197,"children":606},[607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627],{"id":200,"depth":589,"text":201},{"id":210,"depth":589,"text":211},{"id":220,"depth":589,"text":221},{"id":230,"depth":589,"text":231},{"id":240,"depth":589,"text":241},{"id":250,"depth":589,"text":251},{"id":260,"depth":589,"text":261},{"id":270,"depth":589,"text":271},{"id":280,"depth":589,"text":281},{"id":290,"depth":589,"text":291},{"id":300,"depth":589,"text":301},{"id":310,"depth":589,"text":311},{"id":320,"depth":589,"text":321},{"id":333,"depth":589,"text":334},{"id":343,"depth":589,"text":344},{"id":353,"depth":589,"text":354},{"id":363,"depth":589,"text":364},{"id":373,"depth":589,"text":374},{"id":383,"depth":589,"text":384},{"id":393,"depth":589,"text":394},{"id":403,"depth":589,"text":404},{"id":413,"depth":586,"text":414,"children":629},[630,631,632,633,634,635,636,637,638,639,640,641,642,643,644],{"id":417,"depth":589,"text":418},{"id":427,"depth":589,"text":428},{"id":437,"depth":589,"text":438},{"id":447,"depth":589,"text":448},{"id":457,"depth":589,"text":458},{"id":467,"depth":589,"text":468},{"id":477,"depth":589,"text":478},{"id":487,"depth":589,"text":488},{"id":497,"depth":589,"text":498},{"id":507,"depth":589,"text":508},{"id":517,"depth":589,"text":518},{"id":527,"depth":589,"text":528},{"id":537,"depth":589,"text":538},{"id":549,"depth":589,"text":550},{"id":559,"depth":589,"text":560},[646],"WUST-OJ","2025-06-15 00:00:00","WUST OJ C++ 面向对象题集参考代码整理，代码块中的 main 测试函数已删去，方便按题目直接复制提交。",false,"md","https:\u002F\u002Fi.postimg.cc\u002FZnCzZKvr\u002F2cb79efe667b08d4b12e3b103d67653.jpg",{"slots":653},{},true,"\u002F2025\u002Fwust-oj-cpp-reference-code",null,{"text":658,"minutes":659,"time":660,"words":661},"47 min read",46.84,2810400,9368,{"title":5,"description":648},{"loc":655},"posts\u002F2025\u002Fwustoj-cpp参考代码",[666,544,646,667],"学习","参考代码","tech","2026-07-01 16:04:58","3QaGer7-rKWnj1oGTG3CDpwbga9jEM0VB7-h7fp96eM",[656,672],{"title":673,"path":674,"stem":675,"date":676,"type":668,"children":-1},"2025 | 中国近现代史重点","\u002F2026\u002Fmodern-history-review","posts\u002F2026\u002F2025 近代史纲要重点","2026-01-08 10:35:50",1786256779842]