源码 include include include include struct data { char name[64]; }; struct fp { int ( fp)(); }; void winner() { printf("level passed\n"); } void nowinn ...
分类:
其他好文 时间:
2020-05-06 13:38:27
阅读次数:
61
4.1 字典数据结构 typedef struct dict{ //类型特定函数 dictType *type; //私有数据 void *privateata; //哈希表 dictht ht[2]; //rehash 索引,rehash未进行时,值为-1 int rehashidx;}dict; ...
分类:
其他好文 时间:
2020-05-06 12:12:34
阅读次数:
56
1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(int x) : val(x), ...
分类:
其他好文 时间:
2020-05-06 11:59:27
阅读次数:
66
```//以u为根节点//找u的最大子树 中的最大分支//直接连到u上//看看能不能满足条件#include #include #include #include using namespace std;const int N = 400010;struct Node{ int fi, se; vo... ...
分类:
其他好文 时间:
2020-05-06 09:12:09
阅读次数:
59
原文:WPF ObjectDataProvider 这个ObjectDataProvider东西真的是个神奇的存在。 等同于反射。 只不过是写在xaml中。 例如说我要把colors中所有的颜色列举出来。 普通方法: //CB是combobox this.CB.ItemsSource = typeo... ...
题目: 解答: 1 // 总的思想就是 哈希双向链表 2 struct Node 3 { 4 int key; 5 int value; 6 Node* pre; 7 Node* next; 8 // 构造函数初始化 9 Node(int key, int value) : key(key), va ...
分类:
编程语言 时间:
2020-05-05 21:39:13
阅读次数:
69
1. 利用栈:后进先出 将链表从头到尾压入栈中,再从栈中pop出来,对链表从头到尾赋值。 1 /* 2 struct ListNode { 3 int val; 4 struct ListNode *next; 5 ListNode(int x) : 6 val(x), next(NULL) { 7 ...
分类:
其他好文 时间:
2020-05-05 19:42:08
阅读次数:
52
move语义 0、课前秀 + 这个概念不是很懂,但看cppreference里分为了两种:移动构造,移动赋值 + "move constructors" + "move assignment" + 移动语义是通过右值来匹配临时的, 普通的左值能否借助移动语义来优化性能 。 + 这是 "std::mo ...
分类:
编程语言 时间:
2020-05-05 18:01:09
阅读次数:
66
#include<stdio.h>#include<stdlib.h>typedef struct{ int max,min;}Data;int MIN;//通过函数返回最大值,通过全局变量MIN带回最小值int fun1(int a[],int n){ int i,max; max=MIN=a[0 ...
分类:
其他好文 时间:
2020-05-05 15:13:13
阅读次数:
80