上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 87 下一页
摘要: 在学习二叉树的过程中按照书上打出来的代码 记下来要经常看看 希望我和我的树玩得开心 :-) ①二叉搜索树的插入删除搜索输出 #include <bits/stdc++.h> using namespace std; struct Node { int key; Node *left, *right, 阅读全文
posted @ 2018-12-10 15:01 丧心病狂工科女 阅读(270) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/maximum-depth-of-binary-tree/ Given a binary tree, find its maximum depth. The maximum depth is the number of nodes alon 阅读全文
posted @ 2018-12-10 14:47 丧心病狂工科女 阅读(111) 评论(0) 推荐(0) 编辑
摘要: https://leetcode.com/problems/integer-to-roman/ Roman numerals are represented by seven different symbols: I, V, X, L, C, D and M. For example, two is 阅读全文
posted @ 2018-12-10 14:38 丧心病狂工科女 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 1091 N-自守数 代码: #include <bits/stdc++.h> using namespace std; int T; int A(int a) { int cnt = 0; while(a) { a /= 10; cnt ++; } return cnt; } int Pow(in 阅读全文
posted @ 2018-12-10 13:20 丧心病狂工科女 阅读(1570) 评论(3) 推荐(1) 编辑
摘要: https://pintia.cn/problem-sets/994805260223102976/problems/994805286714327040 据维基百科的定义: 插入排序是迭代算法,逐一获得输入数据,逐步产生有序的输出序列。每步迭代中,算法从输入序列中取出一元素,将之插入有序序列中正确 阅读全文
posted @ 2018-12-08 17:24 丧心病狂工科女 阅读(341) 评论(0) 推荐(0) 编辑
摘要: https://pintia.cn/problem-sets/994805260223102976/problems/994805270356541440 批改多选题是比较麻烦的事情,本题就请你写个程序帮助老师批改多选题,并且指出哪道题错的人最多。 输入格式: 输入在第一行给出两个正整数 N(≤ 1 阅读全文
posted @ 2018-12-08 16:27 丧心病狂工科女 阅读(256) 评论(0) 推荐(0) 编辑
摘要: https://pintia.cn/problem-sets/994805260223102976/problems/994805273883951104 萌萌哒表情符号通常由“手”、“眼”、“口”三个主要部分组成。简单起见,我们假设一个表情符号是按下列格式输出的: 现给出可选用的符号集合,请你按用 阅读全文
posted @ 2018-12-08 14:43 丧心病狂工科女 阅读(190) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/1077/problem/E output standard output output standard output output Polycarp has prepared nn competitive programming pro 阅读全文
posted @ 2018-12-07 22:23 丧心病狂工科女 阅读(258) 评论(0) 推荐(0) 编辑
摘要: https://ac.nowcoder.com/acm/contest/315#question A.平方数 代码: #include <bits/stdc++.h> using namespace std; int n; int ans = 0; int main() { scanf("%d", 阅读全文
posted @ 2018-12-06 23:45 丧心病狂工科女 阅读(381) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/1077/problem/D You are given an array ss consisting of nn integers. You have to find any array tt of length kk such that 阅读全文
posted @ 2018-12-06 20:33 丧心病狂工科女 阅读(159) 评论(0) 推荐(0) 编辑
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 87 下一页