10 2011 档案

摘要:下面的代码是自己写的,难免有纰漏之处,发现请指正,谢谢。点击2011年北航计算机复试上机题第一题/*************************************************************************** Problem: 北航2011上机题1* Copyright 2011 by Yan* DATE:* E-Mail: yming0221@gmail.com************************************************************************/#include<stdio.h>i 阅读全文

posted @ 2011-10-21 13:03 yming0221 阅读(163) 评论(0) 推荐(0)

摘要:共有三道编程题,第一道题20分,第二道题15分,第三道题15分,总分50分。考试时间:2个小时。注意:所编程序必须符合标准C语言要求,提交程序名必须遵循题中说明。程序中输入/输出必须按照程序要求(可参见输入/输出样例),不要填加任何额外信息。如果提交C++程序,必须先选择C++语言。当前编程题:求孪生数1.【问题描述】孪生数定义:如果A的约数(因数,包含1,但不包含A本身)之和等于B,B的约数(因数)之和等于A,A和B称为孪生数(A和B不相等)。试找出正整数M和N之间的孪生数。【输入形式】从控制台输入两个正整数M和N(1<=M<N<=20000),中间用一个空格分隔。【输出形 阅读全文

posted @ 2011-10-19 23:33 yming0221 阅读(277) 评论(0) 推荐(0)

摘要:QEMU模拟器项目创始人Fabrice Bellard开发了在JavaScript中运行的模拟器,允许用户在浏览器上(支持Firefox 4和Google Chrome 11)启动Linux。现在,另一位开发者修改了Fabrice Bellard的JS/Linux,允许模拟器启动较新的内核版本linux kernel 3.0.4,同时支持永久储存。图1 最新版本(内核版本为3.0.4) 开发者创建了一个虚拟块设备,它能在HTML5本地储存中储存数据,块设备可以分区和格式化。部分源码(http://stud.hro.nl/0814604/jslinuxdemo/)地址,运行方法是点... 阅读全文

posted @ 2011-10-17 10:45 yming0221 阅读(314) 评论(0) 推荐(0)

摘要:试了好多种方法,通过浏览器Preference中设置,字体看着总是那么别扭,安装了插件Change Font虽然可以使用,可是强制将字体全部更改总感觉不太爽,况且效果不是很好。试了下面这种方法,效果不错编辑~/.config/google-chrome/Default/User StyleSheets/Custom.css文件添加如下几行:*{font-family:"DejaVu Serif","SimSun" !important;} *{text-shadow: silver 0px 0px 1px !important;}第一行是设置分别设置英文 阅读全文

posted @ 2011-10-15 12:15 yming0221 阅读(737) 评论(0) 推荐(0)

摘要:原题地址:http://poj.org/problem?id=2256Artificial Intelligence?Time Limit:1000MSMemory Limit:65536KDescriptionPhysics teachers in high school often think that problems given as text are more demanding than pure computations. After all, the pupils have to read and understand the problem first!So they don 阅读全文

posted @ 2011-10-11 22:45 yming0221 阅读(149) 评论(0) 推荐(0)

摘要:sprintf()使用说明在将各种类型的数据构造成字符串时,sprintf 的强大功能很少会让你失望。由于sprintf 跟printf 在用法上几乎一样,只是打印的目的地不同而已,前者打印到字符串中,后者则直接在命令行上输出。这也导致sprintf 比printf 有用得多。sprintf 是个变参函数,定义如下:int sprintf( char *buffer, const char *format [, argument] ... );除了前两个参数类型固定外,后面可以接任意多个参数。而它的精华,显然就在第二个参数:格式化字符串上。printf 和sprintf 都使用格式化字符串来指 阅读全文

posted @ 2011-10-10 23:32 yming0221 阅读(379) 评论(0) 推荐(0)

摘要:原题地址http://poj.org/problem?id=3517And Then There Was OneTime Limit:5000MSMemory Limit:65536KDescriptionLet’s play a stone removing game.Initially,nstones are arranged on a circle and numbered 1, …,nclockwise (Figure 1). You are also given two numberskandm. From this state, remove stones one by one f 阅读全文

posted @ 2011-10-09 23:33 yming0221 阅读(235) 评论(0) 推荐(0)

摘要:原题地址http://poj.org/problem?id=3505Tower ParkingTime Limit:1000MSMemory Limit:65536KDescriptionThere is a new revolution in the parking lot business: the parking tower. The concept is simple: you drive your car into the elevator at the entrance of the tower, and the elevator and conveyor belts drag t 阅读全文

posted @ 2011-10-08 13:36 yming0221 阅读(240) 评论(0) 推荐(0)

摘要:原题地址http://poj.org/problem?id=3852String LDTime Limit:1000MSMemory Limit:65536KDescriptionStringld (left delete) is a function that gets a string and deletes its leftmost character (for instance Stringld(“acm”) returns “cm”).You are given a list of distinct words, and at each step, we apply stringld 阅读全文

posted @ 2011-10-05 23:47 yming0221 阅读(210) 评论(0) 推荐(0)

摘要:相同点:都可用于申请动态内存和释放内存不同点:(1)操作对象有所不同。malloc与free是C++/C 语言的标准库函数,new/delete 是C++的运算符。对于非内部数据类的对象而言,光用maloc/free 无法满足动态对象的要求。对象在创建的同时要自动执行构造函数, 对象消亡之前要自动执行析构函数。由于malloc/free 是库函数而不是运算符,不在编译器控制权限之内,不能够把执行构造函数和析构函数的任务强加malloc/free。(2)用法上也有所不同。函数malloc 的原型如下:void * malloc(size_t size);用malloc 申请一块长度为length 阅读全文

posted @ 2011-10-05 13:13 yming0221 阅读(112) 评论(0) 推荐(0)

摘要:原题地址http://poj.org/problem?id=3914DuLLTime Limit:1000MSMemory Limit:65536KDescriptionIn Windows, a DLL (or dynamic link library) is a file that contains a collection of pre-compiled functions that can be loaded into a program at runtime. The two primary benefits of DLLs are (1) only one copy of a DL 阅读全文

posted @ 2011-10-04 23:52 yming0221 阅读(231) 评论(0) 推荐(0)

摘要:在gnome3下compiz已经无法使用,以前使用的快捷键已经无法使用,这里可以同样设置,达到视觉效果和实用效果的双重效果1 设置已有快捷键System-tools>>System Settings2 设置截屏快捷键补充一下:抓图Take Screenshot的参数–window Takes a screenshot of the window that has focus.–delay=seconds Takes a screenshot after the specified number of seconds,and displays the Save Screenshot 阅读全文

posted @ 2011-10-04 13:07 yming0221 阅读(198) 评论(0) 推荐(0)

导航