- 博客(14)
- 资源 (2)
- 收藏
- 关注
原创 SRM 670 DIV 2 Cdgame 250-point
Problem StatementTwo players are playing a cooperative game. At the beginning of the game each player has some cards. There is a positive integer written on each card. The game is played as follows:
2015-10-12 10:10:40 572
原创 SRM 669 DIV 2 CombiningSlimes 500-point
Problem StatementThe idols Ami and Mami like playing games. Today they bought a new game. At the beginning of the game a group of slimes appears on the screen. In each turn of the game the player can s
2015-10-10 09:59:44 593
原创 SRM 669 DIV 2 LiveConcert 250-point
Problem StatementToday, a large live concert is going to take place. Some interprets (called “idols”) are going to perform at the concert. Different idols have different names. There are M distinct so
2015-10-09 09:41:32 535
原创 SRM 667 DIV2 OrderOfOperationsDiv2 500-point
Problem StatementCat Noku has just finished writing his first computer program. Noku’s computer has m memory cells. The cells have addresses 0 through m-1. Noku’s program consists of n instructions. Th
2015-10-08 09:26:16 610
原创 SRM 667 DIV 2 PointDistance 250-point
Problem StatementYou are given two distinct points A and B in the two-dimensional plane. Your task is to find any point C with the following properties: C is different from A and B. Each coordinate o
2015-09-28 09:36:12 574
原创 SRM 668 DIV 2 AnArray 1000-point
Problem StatementOne day, Bob the Coder was wondering whether abstract programming problems can have applications in practice. The next day, he was selected to be on a quiz show. He will win one millio
2015-09-24 10:02:23 629
原创 SRM 668 DIV 2 IsItASquare 600-point
Problem StatementIt’s a bird! It’s a plane! No, it’s a square in a plane! Wait, is it really a square? There are four distinct points in the plane. You are given their coordinates in the vector s x an
2015-09-23 10:03:37 593
原创 SRM 668 DIV 2 VerySecureEncryption 250point
Problem StatementYou are going to send a message to your friend. The message is given as the string message. To confuse potential eavesdroppers, you are going to scramble the message. Scrambling of a
2015-09-22 09:46:36 587
原创 TCP客户/服务器程序示例
这一章就是就是给了个客户服务器的程序例子,然后围绕这个小例子,可能会出现什么问题,该如何改进,然后就改进了一个又一个的版本。一、TCP客户/服务器的简单版本服务器TCP回射服务器程序:main函数:#include "unp.h"intmain(int argc, char **argv){ int listenfd, connfd; pid
2015-09-21 21:00:15 410
原创 基本TCP套接字编程
这一章是围绕下面这个图展开介绍的: 所有客户和服务器都从调用socket开始,它返回一个套接字描述符。客户随后调用connect,服务器则调用bind、listen和accept。套接字通常使用标准的close函数关闭。 个人认为重要的内容:1)TCP为监听套接字维护的两个队列;2)监听套接字与已连接套接字;3)并发服务器。TCP为监听套接字维护的两个队列未完成连
2015-08-30 18:12:05 598
原创 套接字编程简介
这是unp的第三章,主要讲了一些基础的struct以及一些基础的API,这些struct在后面会一直使用的。 IPv4与IPv6的结构尽管不一样,但类似,连起名都只是IPv6的比IPv4的多来个6,如:struct in6_addr与struct in_addr,struct sockaddr_in6与struct_ sockaddr_in等。猜想之所以是sockaddr_in而不是
2015-08-24 20:56:48 408
原创 unix网络编程第三版环境配置
根据unp3前沿部分的“如何使用本书”,决定先看本书的第二部分,即第3至11章,这部分偏实践。 当看到确定主机字节序的时候出现了一段程序:#include "unp.h"intmain(int argc, char **argv){ union { short s; char c[sizeof(short)]; } un;
2015-08-23 16:04:09 1882 3
原创 Unix网络编程开篇
最近想学习下后端,网上搜了搜,最后决定还是从《UNIX网络编程》这本书开始看。本系列博客只是对我在学习UINIX网络编程的过程中的记录,把我认为比较重要的记录下来,高手在看的过程中发现我有理解不对的地方请不吝指正!
2015-08-22 22:02:42 905
原创 程序员如何提高工作效率(cocos2dx+lua+VS2013+BabeLua)
程序员如何提高工作效率(cocos2dx+lua+VS2013+BabeLua)作为一名开发者,我觉得对自己使用的工具要非常熟悉,要能够非常熟练的使用。下面谈谈我在平时工作中使用的工具及一些经验。1. 我工作中使用的工具开发工具:常用:VS2013+BabeLua偶尔使用:Cocos Code IDE UI工具:Cocos Studio UI 打包工具:Texture
2015-08-21 10:08:20 3864
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人