- 博客(20)
- 收藏
- 关注
转载 select服务器端模型封装——回调方式快速建立客户端
#pragma once#ifndef WINSOCK2_H #define _WINSOCK_DEPRECATED_NO_WARNINGS #include<WinSock2.h> #include<Windows.h> #pragma comment(lib, "ws2_32.lib")...
2019-10-08 16:28:00
169
转载 python实现的ocr接口
太累了,,有时间再补解释import pytesseractimport requestsfrom PIL import Imagefrom PIL import ImageFilterfrom StringIO import StringIOfrom werkzeug.utils import secure_filenamefrom gevent imp...
2019-09-21 19:46:00
296
转载 汉字字典树
参考:https://blog.youkuaiyun.com/Dacc123/article/details/79771299省略了一些头文件 1 #ifndef CHINESETRIETREE_H 2 #define CHINESETRIETREE_H 3 4 5 6 7 struct Node { 8 map<string,Node ...
2018-12-04 20:27:00
174
转载 linux下简易端口扫描器
1 #include<iostream> 2 #include<string.h> 3 #include<sys/types.h> 4 #include<sys/socket.h> 5 #include<arpa/inet.h> 6 #include<unistd.h> 7 using ...
2018-10-17 18:52:00
126
转载 Linux下cs简单通讯(socket)
Server: 1 #include<iostream> 2 #include<sys/types.h> 3 #include<sys/socket.h> 4 #include<arpa/inet.h> 5 #include<unistd.h> 6 #include <errno.h>...
2018-10-17 17:58:00
137
转载 POj 1321 棋盘问题 DFS 回溯
#include<iostream>#include<cstring>using namespace std;int m,k,ans;char s[1010][1010];int vis[1010][1010];bool check(int x,int y){ for(int i=0;i<m;i++)...
2018-09-11 20:42:00
117
转载 HDU 1097 快速幂
#include<iostream>using namespace std;long long quick(long long a,long long b,int c){ int ans=1; a=a%c; while(b!=0) { if(b&1) ans=(ans*a)%c; ...
2018-09-11 18:55:00
72
转载 HDU 1205
#include <iostream>#include <algorithm>#include <cstdio>#include <cstring>using namespace std;int main(){ int t,n,x; long long maxn,all; s...
2018-09-09 21:50:00
123
转载 HDU 1241 DFS
#include <iostream>#include <cstdio>#include <cstring>using namespace std;int m,n;char s[110][110];int vis[110][110];void dfs(int x,int y,int v){ if...
2018-09-09 21:32:00
75
转载 HDU 2037(贪心)
“今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级女生,以及王小丫的《开心辞典》等等,假设...
2018-07-24 16:33:00
91
转载 一次傻乎乎的错误QAQ
东北联赛上有一道题,数据范围是2^60,当时不记得long long的范围,于是写了一个程序试了一下,把队友带入了一个大数的大坑QAQ(蠢哭)。当时写的代码是这样的: 1 #include<iostream> 2 3 using namespace std; 4 5 int main() 6 { 7 long long x=1&...
2018-06-20 12:00:00
115
转载 封装Qt的SQLite接口类
还没测试完善。。 1 #ifndef SQLITE_H 2 #define SQLITE_H 3 4 #include <QSqlDatabase> 5 #include <QSqlQuery> 6 #include <QSqlRecord> 7 #include <QSqlError> 8 #incl...
2018-06-09 15:52:00
695
转载 最小生成树(Kruskal算法)模板
#include<iostream>#include<algorithm>using namespace std;int f[20000],n;struct node{ int u,v,val; bool operator < (node&a) const { ret...
2018-02-12 15:00:00
116
转载 HDU1232 畅通工程(并查集)
1 #include<iostream> 2 using namespace std; 3 4 int num[10000]; 5 6 int findx(int x) 7 { 8 while(num[x]!=x)x=num[x]; 9 return x;10 } 11 12 void merge(int x...
2017-12-20 16:15:00
81
转载 HOJ 2315 Time(模拟)
DescriptionKim是一个掌控时间的大师。不同于一般人,他习惯使用秒来计算时间。如果你问他现在是几点,他会告诉你现在是今天的xxxx秒。Mik想要考考Kim。他想知道从某一天的00:00:00开始,经过s秒后是哪一天。但是Mik不会计算答案,他需要你的帮助。注意:我们认为一天从00:00:00开始,到23:59:59结束。00:00:00经过1秒后...
2017-12-13 17:37:00
101
转载 关闭进程接口封装
1 #pragma once 2 3 #ifndef WINDOWS_H 4 #define WINDOWS_H 5 #include<Windows.h> 6 #endif 7 8 #ifndef TLHELP32_H 9 #define TLHELP32_H10 #include <TlHelp32.h>11 ...
2017-11-25 11:37:00
108
转载 素数环
1 #include<stdio.h> 2 #include<math.h> 3 int n; 4 int table[101]; 5 int ans[50]; 6 7 int x(int n) 8 { 9 int a=sqrt(n);10 for(int i=2; i<=a; i++)11 ...
2017-11-16 19:23:00
111
转载 最小公倍数和最大公约数
辗转相除求得最小公倍数两数相乘再除以最小公倍数即为最大公约数 1 #include<stdio.h> 2 3 int main() 4 { 5 int m,n; 6 while(scanf("%d%d",&m,&n)!=EOF) 7 { 8 int a=m,b=n; 9 ...
2017-10-31 15:43:00
72
转载 康托展开和逆康托展开
妈妈再也不用担心生成全排列字典序很慢了!首先用康托展开的公式镇楼:X=a[n]*(n-1)!+a[n-1]*(n-2)!+...+a[i]*(i-1)!+...+a*0!暂且不解释这个公式的意义,我们先看下面的问题。有n=4个元素1,2,3,4,将四个元素组成的全排列按字典序排列。输入一个排列,输出次排列在字典序中的顺序数。输入:4123输出:19...
2017-10-19 13:21:00
136
转载 保证只有一个当前程序在运行
SetLastError(0); HANDLE hmutex = CreateMutex(NULL, FALSE, (LPCSTR)L"5D0E714F-8C2E-94D3-E819-92C54FDD2EDC"); if (GetLastError() == ERROR_ALREADY_EXISTS) { return 0; }Se...
2017-10-14 19:27:00
163
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人