练习71: 题目: 编写input()和output()函数输入,输出5个学生的数据记录。 程序: N = 5 # stu # num : string # name : string # score[4]: list student = [] for i in range(5): student. ...
分类:
编程语言 时间:
2021-03-06 14:13:52
阅读次数:
0
typedef type newname; // 为已有的类型取一个新名字 // 枚举类型 enum color {red, green=5, yellow}; // color: 枚举名 // red, green, yellow: 标识符 // 默认,第一个标识符的值为0,第二个标识符的值为1, ...
分类:
编程语言 时间:
2021-03-01 13:50:41
阅读次数:
0
404 按理说也可以递归做。 public static int sumOfLeftLeaves(TreeNode root) { int total = 0; LinkedList<TreeNode> stack = new LinkedList<>(); stack.push(root); wh ...
分类:
其他好文 时间:
2021-02-23 14:11:21
阅读次数:
0
0 引言 本文将常用的指令记录下来,以备查询。 1 git Command Meaning Reference Linking git status view all files' state, tracked or untracked, commited or un commited git st ...
分类:
系统相关 时间:
2021-02-19 13:10:17
阅读次数:
0
题意 把字符串前面的若干个字符转移到字符串的尾部,要求只用一个函数实现 思路 利用线性代数中的矩阵求逆的思想:\((AB)^{-1} = B^{-1}A^{-1}\) 定义一个函数reverse(s, l, r),将字符串s的[l, r]区间内的元素逆置,比如abc变为cba,这个reverse() ...
分类:
其他好文 时间:
2021-02-16 12:14:14
阅读次数:
0
有时候需要把PHP的数组倒序一下,PHP很方便,一个函数搞定。
array_reverse()函数
$a=array(1,2,4,5,6);
print_r(array_reverse($a));
结果:Array ( [0] => 6
[1] => 5
[2] => 4
[3] => 2
... ...
分类:
编程语言 时间:
2021-02-15 12:23:46
阅读次数:
0
UOJ87 mx的仙人掌 这里没有用传统的方点外接圆点的做法,而是方点虚树上儿子跳到方点所在环上单调队列处理,本质上是一样的. code //爽! #include<bits/stdc++.h> using namespace std; typedef long long ll; const int ...
分类:
其他好文 时间:
2021-02-06 12:15:50
阅读次数:
0
LinkedHashMap<String,User> result = //方法一 map.entrySet().stream() //根据User中某个字段进行排序 .sorted(Map.Entry.comparingByValue( //若为Map<String,String>,则不需要下面这 ...
分类:
编程语言 时间:
2021-02-06 11:44:18
阅读次数:
0
没有壳,用ida64打开。 查看sub_55B4BF947860函数 这个算法直接没见过,看大佬的wp知道用z3库写。 1 from z3 import * 2 3 s = Solver() 4 v1 = Int('v1') 5 v2 = Int('v2') 6 v3 = Int('v3') 7 v ...
分类:
其他好文 时间:
2021-01-28 11:57:46
阅读次数:
0
反转一个单链表。 示例: 输入: 1->2->3->4->5->NULL输出: 5->4->3->2->1->NULL进阶:你可以迭代或递归地反转链表。你能否用两种方法解决这道题? 来源:力扣(LeetCode)链接:https://leetcode-cn.com/problems/reverse- ...
分类:
其他好文 时间:
2021-01-27 14:05:27
阅读次数:
0