04 2015 档案

【程序员面试宝典】错题好题汇总ch7
摘要:错题,知识盲点、查漏补缺好题,开阔思路、锻炼思维ch7 指针与引用1.传递动态内存 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 void GetMemory(char *p,int num){ 8 ... 阅读全文

posted @ 2015-04-11 19:55 Qin&Yang 阅读(245) 评论(0) 推荐(0)

位运算 格雷码 gray
摘要:题目:It is necessary to arrange numbers from 0 to 2^(N+M)-1 in the matrix with 2^N rows and 2^M columns. Moreover, numbers occupying two adjacent cells ... 阅读全文

posted @ 2015-04-11 12:43 Qin&Yang 阅读(370) 评论(0) 推荐(0)

【Nginx】第一个程序Hello World
摘要:要注意,先关闭Nginx再添加第三方的模块,负责会编译不进去,我被这个地方坑了好久。关闭命令:/usr/local/nginx/sbin/nginx -s quit然后才是:./configure --prefix=/usr/local/nginx --add-module=/root/coding... 阅读全文

posted @ 2015-04-11 10:22 Qin&Yang 阅读(1279) 评论(0) 推荐(0)

【Nginx】基础配置
摘要:1.安装gcc,gcc-c++以及pcre库zlib库Openssl库。2.内核参数的优化,修改/etc/sysctl.conffs.file-max = 999999net.ipv4.tcp_tw_reuse = 1net.ipv4.tcp_keepalive_time = 600net.ipv4... 阅读全文

posted @ 2015-04-11 10:16 Qin&Yang 阅读(123) 评论(0) 推荐(0)

用位运算解决皇后问题以及皇后变体问题
摘要:问题描述:N皇后问题或者如下皇后变体问题:在一个6*6的棋盘里放置4个互不攻击的车的方案数为多少?(阿里2016实习生在线笔试题)#include#include#include#include#includeusing namespace std;int n,m,goal;int ans,sum;... 阅读全文

posted @ 2015-04-09 17:48 Qin&Yang 阅读(367) 评论(0) 推荐(0)

备忘
摘要:#include using namespace std; int a[1000]; int waiting = 1; int main(){ int temp = 0; int i = 0; while(cin>>temp){ a[temp] = 1; if(temp == waiting){ cout<<waiting; for(i = waiting ... 阅读全文

posted @ 2015-04-02 22:06 Qin&Yang 阅读(198) 评论(0) 推荐(0)