自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(47)
  • 收藏
  • 关注

转载 winsock中select模型实战

选择(select)模型是Winsock中最常见的 I/O模型。核心便是利用 select 函数,实现对 I/O的管理!利用 select 函数来判断某Socket上是否有数据可读,或者能否向一个套接字写入数据,防止程序在Socket处于阻塞模式中时,在一次 I/O 调用(如send或recv、accept等)过程中,被迫进入“锁定”状态;同时防止在套接字处于非阻塞模式中时,产生WSAEWOULD

2017-12-26 22:04:35 737

原创 LibreOJ103-子串查找

#103. 子串查找 内存限制:256 MiB时间限制:500 ms标准输入输出 题目类型:传统评测方式:文本比较 上传者: 匿名 提交提交记录统计讨论测试数据 题目描述 这是一道模板题。 给定一个字符串 A AA 和一个字符串 B BB,求 B BB 在 A AA 中的出现次数。 A AA 中不同

2017-11-12 17:01:22 829

原创 codefoeces 411 div 2 -3-palindrome

B. 3-palindrome time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output In the beginning of the new year Keivan decided to reverse his name. He do

2017-10-23 16:46:24 369

原创 codeforces 411div2-fake NP

A. Fake NP  time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Tavak and Seyyed are good friends. Seyyed is very

2017-10-23 16:17:54 302

原创 codeforces 411 div2-find amir

Find Amir time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A few years ago Sajjad left his school and register to anoth

2017-10-23 16:08:15 327

原创 java类的简单应用-矩形的面积和周长

创建一个简单的表示矩形的Rectangle类,满足以下条件: 1、定义两个成员变量height和width,表示矩形的长和宽,类型为整型 2、定义一个getArea方法,返回矩形的面积 3、定义一个getPerimeter方法,返回矩形的周长 4、在main函数中,利用输入的2个参数分别作为矩形的长和宽,调用getArea和getPermeter方法,计算并返回矩形的面积和周长 输入:

2017-10-17 13:07:28 5086

原创 java简单应用—信号报告

题目内容: 无线电台的RS制信号报告是由三两个部分组成的: R(Readability) 信号可辨度即清晰度. S(Strength)    信号强度即大小. 其中R位于报告第一位,共分5级,用1—5数字表示. 1---Unreadable 2---Barely readable, occasional words distinguishable 3---

2017-10-10 22:15:24 632

原创 java基础——时间转换

题目内容: UTC是世界协调时,BJT是北京时间,UTC时间相当于BJT减去8。现在,你的程序要读入一个整数,表示BJT的时和分。整数的个位和十位表示分,百位和千位表示小时。如果小时小于10,则没有千位部分;如果小时是0,则没有百位部分;如果分小于10分,需要保留十位上的0。如1124表示11点24分,而905表示9点5分,36表示0点36分,7表示0点7分。 有效的输入范围是0到23

2017-09-19 21:56:26 582

原创 poj1979-Red and Black

Red and Black Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 37141   Accepted: 20181 Description There is a rectangular room, covered with square tiles. Eac

2017-09-08 20:57:09 322

原创 poj2386-lak counting

Lake Counting Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 36990   Accepted: 18396 Description Due to recent rains, water has pooled in various places in

2017-09-08 20:00:58 320

原创 传送带

传送带 成绩 10 开启时间 2017年09月8日 星期五 10:00 折扣 0.8 折扣时间 2017年09月15日 星期五 23:00 允许迟交 否 关闭时间 2017年10月10日 星期二 00:05 小明的飞机快要赶不上了! 幸好大厅的路上有一些传送带。每个传送带都有一定的速度,传送带之间没有重叠。

2017-09-08 19:03:06 504

原创 蜜汁序列

蜜汁序列 成绩 10 开启时间 2017年09月8日 星期五 10:00 折扣 0.8 折扣时间 2017年09月15日 星期五 23:00 允许迟交 否 关闭时间 2017年10月10日 星期二 00:00 题目描述 传说中有一种蜜汁序列特别甜,所以爱吃甜的强渣学长特别喜欢这种序列。。。 蜜汁序列的定义如下

2017-09-08 16:22:47 462

原创 贪婪的你

贪婪的你 成绩 10 开启时间 2017年09月8日 星期五 10:00 折扣 0.8 折扣时间 2017年09月15日 星期五 23:00 允许迟交 否 关闭时间 2017年10月10日 星期二 00:00 Description   现在大家正在为完成网络教室的题目而奋斗。你想获得更高的分数,但发现自己的效

2017-09-08 12:09:01 575

原创 合并果子

合并果子 成绩 10 开启时间 2017年09月8日 星期五 10:00 折扣 0.8 折扣时间 2017年09月15日 星期五 23:00 允许迟交 否 关闭时间 2017年10月10日 星期二 00:00 在一个果园里,多多已经将所有的果子打了下来,而且按果子的不同种类分成了不同的堆。多多决定把所有的果子合成

2017-09-08 10:41:31 344

原创 电话号码问题

商业单位需要容易记忆的电话号码,有一些方法可以让电话号码变得更容易记忆。譬如,可以把电话号码写成单词或短语,如 MON-GLOP 可以代表滑铁卢大学的电话。有时仅仅是把号码的一部分写成单词,如打 310-GINO 便可向 GINO 比萨饼店定购比萨。另一种让电话号码容易记忆的方法是将数字用一种容易记的方式组合起来,譬如 3-10-10-10 也可以代表 GINO 比萨饼店。 电话号码

2017-09-07 15:27:55 1039

原创 C语言位图算法

位图法定义: 位图法就是bitmap的缩写,所谓bitmap,是用每一位来存放某种状态,适用于大规模数据,但数据状态又不是很多的情况。通常是用来判断某个数据存不存在的。 例如,要判断一千万个人的状态,每个人只有两种状态:男人,女人,可以用0,1表示。那么就可以开一个int数组,一个int有32个位,就可以表示32个人。操作的时候可以使用位操作。   数据结构: ?

2017-09-05 18:54:03 3103

转载 C语言qsort的用法和使用

qsort函数包含在的头文件里。 qsort函数声明如下: void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); 参数说明如下: base: 要排序的数组 nmemb: 数组中的元素数目 size: 每个数组元素占用内存空间,可使用sizeof获得

2017-09-04 23:30:59 543

原创 识别条形码

识别条形码 成绩 10 开启时间 2017年08月28日 星期一 09:00 折扣 0.8 折扣时间 2017年09月2日 星期六 22:00 允许迟交 否 关闭时间 2017年10月10日 星期二 00:00 计算机学院2013级的院草语文难同学是软院院花牟黑黑爱慕的对象,因此牟黑黑经常约楠神去逛街,楠神不喜欢

2017-08-28 23:44:44 856

原创 codeforces round 22-B.the golden age

The Golden Age time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Unlucky year in Berland is such a year that i

2017-06-07 19:33:05 468

原创 codeforces#416 div2- Vladik and Complicated Book

B. Vladik and Complicated Book time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vladik had started reading a

2017-06-01 12:48:20 444

原创 codeforces #416 div2 811A-Vladik and Courtesy

time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output At regular competition Vladik and Valera won a and b candies r

2017-05-29 18:20:19 327

原创 codeforces #352(div1)-Robin Hood

time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output We all know the impressive story of Robin Hood. Robin Hood uses h

2017-05-29 16:21:00 278

原创 HDU3427-Clickomania

Clickomania Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 635    Accepted Submission(s): 321 Problem Description Clickomania is a p

2017-05-22 23:05:32 287

原创 Factorial vs Power

Consider two integer sequences f(n) = n! and g(n) = an, where n is a positive integer. For any integer a > 1 the second sequence is greater than the first for a finite number of values. But starting

2017-05-17 20:55:27 277

原创 求偏序集中的极大元与极小元

输入 输入偏序集<A, £>,A中的元素数不超过20个,分别用单个小写的英文字母表示。 输入的第一行给出A中的各个元素,两个相邻的元素之间用逗号隔开。 输入的第二行给出偏序关系£,用有序对的形式给出(只给出哈斯图中的满足覆盖的两个元素形成的有序对),如,等等,两个相邻的有序对之间用逗号隔开。 输出 输出A的极小元与极大元。 输出的第一行给出各个极小元,

2017-05-16 21:56:41 3062

原创 概率

时间限制1秒 内存限制64M 题目表述    有n个房间,标号从1到n。对于房间i,如果i是奇数(偶数),从该房间到所有偶数(奇数)的房间k(k>i)都有一条单向通道(不能从k走回i)。小强有强烈的选择恐惧症,他选择任何一条道路的概率都是相同的。现在他从1号房间出发,一直走到不能移动为止,他想知道他经过每一个房间的概率。   输入 单组用例,输入一个整数n(n   输

2017-05-07 20:56:49 401

转载 离散数学—求主范式

输入:命题公式的合式公式 输出:公式的主析取范式和主析取范式,输出形式为:“ mi ∨ mj ; Mi ∧ Mj” ,极小项和 ∨ 符号之间有一个空格,极大项和 ∧ 符号之间有一个空格;主析取范式和主合取范式之间用“ ; ”隔开,“ ; ”前后各有一个空格。 永真式的主合取范式为 1 ,永假式的主析取范式为 0 。 输入公式的符号说明: ! 非,相当于书面符号中的 “ ¬ ” & 与,相当

2017-04-30 18:13:59 3887

原创 HDU 2473——junk mails

Recognizing junk mails is a tough task. The method used here consists of two steps:  1) Extract the common characteristics from the incoming email.  2) Use a filter matching the set of common charac

2017-04-23 10:00:31 352

原创 HDU-5510 Bazinga

Ladies and gentlemen, please sit up straight. Don't tilt your head. I'm serious. For n n given strings S 1 ,S 2 ,⋯,S n  S1,S2,⋯,Sn, labelled from 1 1 to n n, you should find the larg

2017-04-22 18:32:03 358

原创 HDU5032--Grade

Ted is a employee of Always Cook Mushroom (ACM). His boss Matt gives him a pack of mushrooms and ask him to grade each mushroom according to its weight. Suppose the weight of a mushroom is w, then it’

2017-04-22 18:29:47 319

原创 Benches

The city park of IT City contains n east to west paths and n north to south paths. Each east to west path crosses each north to south path, so there are n2 intersections. The city funded purchase of

2017-04-20 08:49:32 379

原创 Parking lot

To quickly hire highly skilled specialists one of the new IT City companies made an unprecedented move. Every employee was granted a car, and an employee can choose one of four different car makes. T

2017-04-20 08:46:05 1125

原创 period

For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each i (2

2017-03-25 16:39:17 262

原创 Count the string

It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example: s: "ab

2017-03-25 15:14:29 283

原创 亲和串

人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。 亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含在s1中,那么我们就说s2 是s1的亲和串。

2017-03-25 14:06:21 405

原创 花布条

一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 Outpu

2017-03-25 13:48:38 672

原创 hdu 1827 ---A+B again

Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as “asdf” and “sdfg”, the result of the addition between

2017-03-25 12:53:40 271

原创 Kmp简单应用——Number Sequence

Given two sequences of numbers : a1 1, a2 2, ...... , aN N, and b1 1, b2 2, ...... , bM M (1 K K = b1 1, aK+1 K+1 = b2 2, ...... , aK+M−1 K+M−1 = bM M. If there are more than o

2017-03-25 11:17:25 483

原创 vector—— String Manipulation 1.0

One popular website developed an unusual username editing procedure. One can change the username only by deleting some characters from it: to change the current name s, a user can pick number p and

2017-03-22 22:11:35 299

原创 Jeff and Rounding

Jeff got 2n real numbers a1, a2, ..., a2n as a birthday present. The boy hates non-integer numbers, so he decided to slightly "adjust" the numbers he's got. Namely, Jeff consecutively executes n o

2017-03-20 22:44:54 386

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除