码迷,mamicode.com
首页 >  
搜索关键字:clu    ( 12562个结果
求100内质数的个数
// 求100内质数的个数 非容斥 #include #include #include #include #include #include using namespace std; int n,sum; int main() { scanf("%d",&n); for(int i=1;i #in... ...
分类:其他好文   时间:2017-02-02 15:38:45    阅读次数:165
立体图
题目描述 小渊是个聪明的孩子,他经常会给周围的小朋友们将写自己认为有趣的内容。最近,他准备给小朋友们讲解立体图,请你帮他画出立体图。 小渊有一块面积为m*n的矩形区域,上面有m*n个边长为1的格子,每个格子上堆了一些同样大小的积木(积木的长宽高都是1),小渊想请你打印出这些格子的立体图。我们定义每个 ...
分类:其他好文   时间:2017-02-02 14:42:23    阅读次数:202
socket api- c/s模式:全双工 ;IO模式:同步阻塞,select,多路复用。
server: client: 知识点: 1)服务端的多线程改为select复用来处理多用户。 应该服务器瓶颈是在网络。CPU应该不是瓶颈,如果网络不是瓶颈,想再提高性能,可以考虑增加线程处理。 1.标准输入可以另用线程,从select 分离出去。 2.serverFD的accpet,也可以另用线程 ...
分类:Windows程序   时间:2017-02-02 12:13:32    阅读次数:460
南阳399
1 #include 2 int main() 3 { 4 int n,b; 5 while(~scanf("%d%d",&n,&b)) 6 printf("%d\n",n/b); 7 } ...
分类:其他好文   时间:2017-02-02 12:03:58    阅读次数:204
MinGW 编译libwebsockets
libwebsockets是一个轻量的纯C库,在这里尝试使用MinGW进行构建。 官网地址:http://libwebsockets.org/trac/libwebsockets下载地址:http://git.warmcat.com/cgi-bin/cgit/libwebsockets/snapsh ...
分类:Web程序   时间:2017-02-02 11:01:17    阅读次数:222
Holding Bin-Laden Captive!(1.多重背包 2.母函数)
Holding Bin-Laden Captive! Problem Description We all know that Bin-Laden is a notorious terrorist, and he has disappeared for a long time. But recent ...
分类:其他好文   时间:2017-02-01 22:39:28    阅读次数:283
COGS728. [网络流24题] 最小路径覆盖问题
算法实现题8-3 最小路径覆盖问题(习题8-13) ´问题描述: 给定有向图G=(V,E)。设P是G的一个简单路(顶点不相交)的集合。如果V中每个顶点恰好在P的一条路上,则称P是G的一个路径覆盖。P中路径可以从V的任何一个顶点开始,长度也是任意的,特别地,可以为0。G的最小路径覆盖是G的所含路径条数 ...
分类:其他好文   时间:2017-02-01 22:27:09    阅读次数:266
【得分排行】
/* 得分排行 */ #include #include #define MAX 100 #define MIN 0 int main(void) { int score[MAX + 1] = {0}; int juni[MAX + 2] = {0}; int count = 0, i; print... ...
分类:其他好文   时间:2017-02-01 18:57:55    阅读次数:203
南阳244
1 #include<stdio.h> 2 int main() 3 { 4 int n; 5 scanf("%d",&n); 6 while(n--) 7 { 8 int a,b; 9 char s; 10 scanf("%x%c%x",&a,&s,&b); 11 if(s=='+') 12 pr ...
分类:其他好文   时间:2017-02-01 17:16:23    阅读次数:122
448. Find All Numbers Disappeared in an Array
题目 Given an array of integers where 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1,  ...
分类:移动开发   时间:2017-02-01 16:29:38    阅读次数:224
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!