1:写一个close按钮当单击此按钮时就执行槽函数,而关闭窗口. 1 #include "slot.h" 2 #include <QApplication> 3 #include<QPushButton> 4 #include<time.h> 5 #ifndef SLOT_H 6 #define S ...
分类:
其他好文 时间:
2020-02-06 19:54:45
阅读次数:
73
给两个已经排序好的数组A,B,和一个常数k, 找i,j使得 Ai + Bj - k 的绝对值最小 分析: Two pointer, i从A从前往后扫,j从B从后往前扫.if (A[i]+B[j] > k){ j--;}else { i++;}整个过程不断更新答案 ...
分类:
其他好文 时间:
2020-02-06 12:27:56
阅读次数:
53
实现接口:指针接受者与值接受者 在请你阅读接口(一)上的所有示例中,我们都是使用值接受者(Value Receiver)来实现接口的。我们同样可以使用指针接受者(Pointer Receiver)来实现接口。只不过在用指针接受者实现接口时,还有一些细节需要注意。我们通过下面的代码来理解吧 packa ...
分类:
其他好文 时间:
2020-02-05 20:11:10
阅读次数:
70
1、题目 35. Search Insert Position Easy 1781214Add to ListShare Given a sorted array and a target value, return the index if the target is found. If not, ...
分类:
其他好文 时间:
2020-02-05 12:03:43
阅读次数:
66
源程序: #include<iostream>using namespace std; class pointer{public: int a; int *p; //指向整型数的指针 pointer() { a=100; p=new int(10); } pointer(const pointer ...
分类:
其他好文 时间:
2020-02-04 14:02:29
阅读次数:
61
求简单环,即求点=边数的点双分量,加上判断点和边的模板即可 const int maxm = 1e5+5; int head[maxm<<1], edgecnt, dfn[maxm], low[maxm], bcc_cnt, bccnum[maxm], dfs_clock, s[maxm], top ...
分类:
其他好文 时间:
2020-02-04 13:47:50
阅读次数:
76
源程序: #include<iostream>using namespace std; class pointer{public: int a; int *p; //指向整型数的指针 pointer() { a=100; p=new int(10); } pointer(const pointer ...
分类:
其他好文 时间:
2020-02-04 13:45:17
阅读次数:
58
“每一个活着的人都会陷于绝望之中,而且,这是我们的致死之症。这是人拒绝接受他的命运的结果。” “海德格尔所谓的人类的第二次堕落,堕落于平凡和平庸之中。……没有一个哲学家懂得平凡是什么,也没有一个哲学家不深陷于平凡之境。” 看《赫索格》时,直觉告诉我作者应该是一个常年在高校教书的知识分子。上网查了一些 ...
分类:
其他好文 时间:
2020-02-02 23:55:50
阅读次数:
162
打开VSCode安装目录,找到workbench.desktop.main.css文件 在最后一行添加以下代码: body{ pointer-events:auto !important; background-size:100% !important; opacity: 0.8 !importan ...
分类:
其他好文 时间:
2020-02-02 15:44:22
阅读次数:
214