将搜狗的scel文件转换成txt格式,从网站上copy的,但是忘记是哪个网站了。#!/bin/python # -*- coding: utf-8 -*- import struct import sys import binascii import pdb import os try: reloa ...
分类:
其他好文 时间:
2020-08-07 18:06:32
阅读次数:
85
IOC(概念和原理) 什么是 IOC 控制反转(Inversion of Control,缩写为IoC),把对象创建和对象之间的调用过程,交给 Spring 进行管理 使用 IOC 目的:为了耦合度降低 做入门案例就是 IOC 实现 IOC 底层原理 xml 解析 工厂模式 反射 画图讲解 IOC ...
分类:
编程语言 时间:
2020-08-07 18:03:01
阅读次数:
62
注意建树范围开大一点。 x 先让其 +1 ,树状数组不能维护0 这个点。 int n; int c[32005]; struct Point { int x, y; Point(int _x = 0, int _y = 0) { x = _x; y = _y; } friend bool opera ...
分类:
编程语言 时间:
2020-08-07 12:36:18
阅读次数:
81
题目描述: 给定一个二叉树,返回它的中序 遍历。 输入: [1,null,2,3] 1 \ 2 / 3 输出: [1,3,2] //go //* Definition for a binary tree node. type TreeNode struct { Val int Left *TreeN ...
分类:
其他好文 时间:
2020-08-06 09:31:39
阅读次数:
66
题目描述 求给定的二叉树的前序遍历。 例如: 给定的二叉树为{1,#,2,3}, 1 \ 2 / 3 返回:[1,2,3]. 备注;用递归来解这道题太没有新意了,可以给出迭代的解法么? /** * struct TreeNode { * int val; * struct TreeNode *lef ...
分类:
其他好文 时间:
2020-08-05 13:09:09
阅读次数:
71
基本信息维护 struct Splay { int sz, fa, val, cnt, ch[2]; //sz 表示子树大小 //ch[0 / 1]表示左右两个儿子 //fa 表示父亲 //cnt 表示该点的值出现了几次 //val 节点的值 } t[N]; #define ls(p) (t[p]. ...
分类:
编程语言 时间:
2020-08-05 00:11:51
阅读次数:
115
#include<bits/stdc++.h> using namespace std; const int maxn=200005; struct node{ int a; int b; int c; int cnt; int ans; }s1[maxn],s2[maxn]; int n,m,k, ...
分类:
其他好文 时间:
2020-08-03 09:51:54
阅读次数:
74
某些具体程序要求待未发送完的数据发送出去后再关闭socket,可通过设置让程序满足要求: struct linger { u_short l_onoff; u_short l_linger; }; struct linger m_sLinger; m_sLinger.l_onoff = 1; //在 ...
分类:
其他好文 时间:
2020-08-02 12:49:38
阅读次数:
84
题目:找到年龄最大的人,并输出。请找出程序中有什么问题。 程序分析:无。 实例: 1 #include<stdio.h> 2 #include<stdlib.h> 3 struct man{ 4 char name[20]; 5 int age; 6 } 7 person[3]={"li",18," ...
分类:
其他好文 时间:
2020-08-01 21:15:42
阅读次数:
69