#include <bits/stdc++.h> using namespace std; struct B { B() { this->chr = 0xcedf; } short chr; }; struct A { B s; int i; }; int main() { int64_t i64 ...
分类:
其他好文 时间:
2020-05-20 15:52:14
阅读次数:
56
const double eps=1e-8; struct point{ double x,y; void input(){ scanf("%lf%lf",&x,&y); } }; struct segment{ point a,b; void input(){ a.input(); b.input ...
分类:
其他好文 时间:
2020-05-20 14:38:48
阅读次数:
45
一、概述 容器主要包括 Collection 和 Map 两种: Collection 存储着对象的集合 Map 存储着键值对(两个对象)的映射表。 Collection: Map: 1. Set TreeSet: 基于 红黑树 实现,支持有序性操作,例如根据一个范围查找元素的操作。但是查找效率不如 ...
分类:
编程语言 时间:
2020-05-20 14:28:09
阅读次数:
57
链表数据结构的定义很简单(节选自[include/linux/list.h],以下所有代码,除非加以说明,其余均取自该文件): struct list_head { struct list_head *next, *prev; }; list_head结构包含两个指向list_head结构的指针pr ...
分类:
其他好文 时间:
2020-05-20 14:16:32
阅读次数:
47
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} * }; */ class Solu ...
分类:
其他好文 时间:
2020-05-20 12:40:43
阅读次数:
58
最大不重复子串是经典的 滑动窗口 问题 思路: mp记录每个字符出现的最大索引位置 start记录当前不重复子串的起始索引位置 先用Python实现一遍 完全相同的思路再用Go实现一遍 leetcode结果如下 (Python总是被碾压, 哭) ...
分类:
编程语言 时间:
2020-05-19 18:11:15
阅读次数:
53
1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <ctype.h> 4 #include <stdbool.h> 5 #define MAXSIZE 7 6 typedef int ElemType; 7 typedef struct Or ...
分类:
编程语言 时间:
2020-05-19 14:32:17
阅读次数:
55
#include <iostream>#include <string.h>using namespace std; struct student{ int age; char name[10]; char sex[5]; student *next; }; //链表的增删查改 增; int mai ...
分类:
其他好文 时间:
2020-05-19 12:33:02
阅读次数:
51
一、写在开头 无聊写写。最近学习做python GUI, 感觉比网页落后好多。我只是为了完成老师布置的任务, 做一个配合ZBar扫描条形码的小程序, 不打算过多深究二维码什么的。由于pyqt5貌似不是很火爆, 没多少成系统的教程。我能找到的就是 "http://code.py40.com/pyqt5 ...
分类:
其他好文 时间:
2020-05-19 09:12:25
阅读次数:
58
SOJ 3021: Quad Tiling 题意:给出$4\times N$的矩形以及尺寸为$2\times 1$的骨牌,求解该矩形能被骨牌覆盖的种数。 分析:起初我自己一直尝试推导出一个递推式,但是一直没有成功。后来看了网上别人给的递推式:$f(n)=f(n-1)+5*f(n-2)+f(n-3)- ...
分类:
其他好文 时间:
2020-05-18 22:55:54
阅读次数:
73