上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 char d[100][51]; 5 struct node 6 { 7 int p; 8 int r; 9 };10 11 node s[100];12 13 int cmp( constvoid*a, constvoid*b)14 {15 return ((node*)a)->r - ((node*)b)->r;16 }17 int DNAsort(char a[],int n)18 {19 int count =0;20 for(int i =0; i < 阅读全文
posted @ 2011-08-06 17:56 IT屁民 阅读(167) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;int main(int argc, char* argv[]){ int p,e,i,d; int index=0; while(cin>>p>>e>>i>>d) { if(p==-1) break; int n=(5544*p+14421*e+1288*i-d)%(21252); if(n<=0) n+=21252; cout<<"Case "<<++index<<": the nex 阅读全文
posted @ 2011-08-05 22:08 IT屁民 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#define PI 3.1415926int main(){ int n, i = 0, year; double x, y, area; scanf("%d", &n); while (i < n) { scanf("%lf %lf", &x, &y); area = 0.5 * PI * (x*x+y*y); year = area/50; printf("Property %d: This ... 阅读全文
posted @ 2011-08-05 20:45 IT屁民 阅读(151) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>long a[500005];long long merge_inversions(long p, long q, long r){ long n1 = q - p + 1; long n2 = r - q; long *left = new long[n1+1]; long *right = new long[n2+1]; long i, j; for(i = 0; i < n1; i++) left[i] = a[p + i]; for(j = 0; j < n2; j++) right[j] = a[q + j + 1]; le 阅读全文
posted @ 2011-07-19 22:30 IT屁民 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 又是水题。。看来POJ开头的都是水题啊~#include <stdio.h>int main(){ freopen("1.txt", "r", stdin); float sum = 0, t; int m = 0; while( scanf("%f", &t) != EOF ) { sum += t; m++; } printf("$%.2f\n", sum/m);} 阅读全文
posted @ 2011-07-14 20:53 IT屁民 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #define E 0.001 3 4 int main() 5 { 6 double t; 7 while( scanf("%lf", &t) && t <=-E || t >= E ) 8 { 9 double sum =0, i;10 for(i =2; ; i++)11 {12 sum +=1/i;13 if( sum - t > E)14 break;15 }16 printf("%d card(s)\n", (int)(i-1) );17 }1 阅读全文
posted @ 2011-07-14 20:32 IT屁民 阅读(180) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>#include <ctype.h>#include <string.h>char index[100002][100];int index_i = 0;int cmp( const void *a, const void *b){ return strcmp( (char*)a, (char*)b );}void MapToNum(char des[], char src[]){ int j = 0; for(int i = 0; src[i] != '\0 阅读全文
posted @ 2011-07-08 20:21 IT屁民 阅读(178) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <string.h>int a[200], f[200];int main(){ char str[7]; int r[7]; int n; while( scanf("%s %d", str, &n) != EOF ) { strrev(str); int k = 0, flag = 0, _k = 0, dotpos; memset(a, 0, sizeof(a)); for(int p = 0; str[p]!='\0'; p++) if( str[p] !=  阅读全文
posted @ 2011-07-07 20:43 IT屁民 阅读(213) 评论(0) 推荐(0) 编辑
摘要: lib是和dll对应的。lib是静态链接库的库文件,dll是动态链接库的库文件。 所谓静态就是link的时候把里面需要的东西抽取出来安排到你的exe文件中,以后运行你的exe的时候不再需要lib。所谓动态就是exe运行的时候依赖于dll里面提供的功能,没有这个dll,你的exe无法运行。 lib,dll,exe都算是最终的目标文件,是最终产物。而c/c++属于源代码。源代码和最终目标文件中过渡的就是中间代码obj,实际上之所以需要中间代码,是你不可能一次得到目标文件。比如说一个exe需要很多的cpp文件生成。而编译器一次只能编译一个cpp文件。这样编译器编译好一个cpp以后会将其编译成obj, 阅读全文
posted @ 2011-07-05 18:12 IT屁民 阅读(1568) 评论(0) 推荐(0) 编辑
摘要: 一直就想深入了解下游戏引擎内幕。很早就听说过著名的开源游戏图像引擎OGRE。今日有空决定装来玩玩。但是对于软件工程还有VS2010很不了解的我而言,无论是编译还是配置,都如天书一般,还好有高人指点。才得以安装成功。编译及运行环境:Windows 7 、 vs2010。编译前的准备: 1.想编译OGRE,最起码要有OGRE的源码吧。可以去官方网站下载最新的源码包,我这里用的是1.7.3版本的,下载下来的文件叫 ogre_src_v1-7-3.exe。运行下载下来的程序,解压源码到一个目录下备用。 2.下载并安装DirectX SDK,官方建议的版本是 DirectX SDK - Februa.. 阅读全文
posted @ 2011-07-05 17:05 IT屁民 阅读(2642) 评论(0) 推荐(1) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页