https://www.bnuoj.com/v3/problem_show.php?pid=52781 【AC】 1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 const int maxn=5e5 ...
分类:
其他好文 时间:
2017-08-18 22:22:19
阅读次数:
162
练习1,推断是否为素数: // ConsoleAppIsPrime1.cpp : 定义控制台应用程序的入口点。 // /* *函数功能:推断一个输入的数是否为素数 *函数原形:bool Prime( int x ) *參数:int x:将要推断的数 *返回值:bool型变量,推断是否是素数 *备注: ...
分类:
编程语言 时间:
2017-08-18 18:33:47
阅读次数:
232
字符串函数 strlen:获取字符串长度,字节长度 substr:字符串截取,获取字符串(按照字节进行截取) strchr:与substr相似,从指定位置截取一直到最后 strrchr(获取文件后缀名):与strchr一样,只是从右边开始查找字符 strtolower:所有的字符都小写(针对英文字母 ...
分类:
Web程序 时间:
2017-08-18 17:11:52
阅读次数:
194
此文为博主原创题解,转载时请通知博主,并把原文链接放在正文醒目位置。 题目链接:https://www.luogu.org/problem/show?pid=1106 题目描述 键盘输入一个高精度的正整数N,去掉其中任意k个数字后剩下的数字按原左右次序将组成一个新的正整数。编程对给定的N和k,寻找一 ...
分类:
其他好文 时间:
2017-08-18 09:44:01
阅读次数:
175
udp_server #include<stdio.h>#include<sys/socket.h>#include<string.h>#include<netinet/in.h>#define portnum 3333 void main(){ int n,addrlen; char buffer ...
分类:
其他好文 时间:
2017-08-17 22:45:54
阅读次数:
183
#include <stdio.h> #include <string.h> #include <stdlib.h> #define ZERO 0 const int FIRST_CHAR = '0'; char num[11111][20] ; typedef struct node { stru ...
分类:
其他好文 时间:
2017-08-16 21:52:28
阅读次数:
120
本文详细介绍了Delphi中常用的各个关键字名称及用法,供大家在编程过程中借鉴参考之用。详情如下: absolute: 1 2 3 4 5 6 7 8 9 10 //它使得你能够创建一个新变量, 并且该变量的起始地址与另一个变量相同. var Str: string[32]; StrLen: Byt ...
#include<stdio.h>#include<stdlib.h>#include<string.h>#include<sys/types.h>#include<fcntl.h>#include<unistd.h>#include<dirent.h>#include<sys/stat.h>cha ...
分类:
其他好文 时间:
2017-08-15 23:06:33
阅读次数:
221
当我们需要生成一个随机名字,临时密码等字符串时可以用到下面的函数 ...
分类:
Web程序 时间:
2017-08-14 11:25:25
阅读次数:
174