上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 45 下一页

2011年11月9日

摘要: 在网上查到这个问题的解决方法,默认用的是ANSI C规范的编译器选项,即GCC 的参数中加了 -ansi ,这样一来 //XXXX 这种C++形式的注释就不能识别了,解决方法见下图。 阅读全文
posted @ 2011-11-09 21:44 yming0221 阅读(164) 评论(0) 推荐(0)

2011年10月21日

摘要: 下面的代码是自己写的,难免有纰漏之处,发现请指正,谢谢。点击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 阅读(162) 评论(0) 推荐(0)

2011年10月19日

摘要: 共有三道编程题,第一道题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)

2011年10月17日

摘要: 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)

2011年10月15日

摘要: 试了好多种方法,通过浏览器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 阅读(736) 评论(0) 推荐(0)

2011年10月11日

摘要: 原题地址: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)

2011年10月10日

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

2011年10月9日

摘要: 原题地址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 阅读(234) 评论(0) 推荐(0)

2011年10月8日

摘要: 原题地址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)

2011年10月5日

摘要: 原题地址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 阅读(209) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 45 下一页

导航