摘要: Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to ou 阅读全文
posted @ 2021-01-24 23:47 XA科研 阅读(92) 评论(0) 推荐(0) 编辑
摘要: ctrl + shift+a : 代码格式化对齐 ctrl+左右键 : 使光标移动一个单词的距离 shift+左右键 : 可以选中光标左右的一个字符 阅读全文
posted @ 2021-01-24 21:54 XA科研 阅读(620) 评论(0) 推荐(0) 编辑
摘要: A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number 阅读全文
posted @ 2021-01-24 21:40 XA科研 阅读(79) 评论(0) 推荐(0) 编辑
摘要: A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each inp 阅读全文
posted @ 2021-01-22 22:28 XA科研 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 一、vector的常见用法详解 1.vector的定义 头文件:#include<vector> 单独定义一个vector: vector<typename> name; 注:如果typename也是一个STL容器,定义的时候要记得在>>符号之间加上空格,因为一些使用C++11之前标准的编译器会把它 阅读全文
posted @ 2021-01-22 21:29 XA科研 阅读(157) 评论(0) 推荐(0) 编辑
摘要: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some ro 阅读全文
posted @ 2021-01-21 23:25 XA科研 阅读(139) 评论(0) 推荐(0) 编辑
摘要: It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that c 阅读全文
posted @ 2021-01-19 22:44 XA科研 阅读(146) 评论(0) 推荐(0) 编辑
摘要: This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occu 阅读全文
posted @ 2021-01-15 23:44 XA科研 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 设计函数分别求两个一元多项式的乘积与和(含排序) C++代码(全指针,无引用): #include<iostream> #include<algorithm> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> # 阅读全文
posted @ 2021-01-15 22:36 XA科研 阅读(444) 评论(0) 推荐(0) 编辑
摘要: A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re 阅读全文
posted @ 2021-01-14 21:41 XA科研 阅读(119) 评论(0) 推荐(0) 编辑