上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 21 下一页
原题链接:http://poj.org/problem?id=1258周四上了节数据结构终于知道何为最小生成树,晚上回寝,遂得此题!Agri-NetTime Limit:1000MSMemory Limit:10000KTotal Submissions:29613Accepted:11750DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He n Read More
posted @ 2012-11-16 02:49 free斩 Views(185) Comments(0) Diggs(0) Edit
来源:http://my.oschina.net/dianpaopao/blog/83844#include<stdio.h>#include<stdlib.h>#define NMAX 10000000#define SQRN 10000int main(){ int n; scanf("%d",&n); static char a[NMAX]; unsigned long k,i; for(k=2;k<=SQRN;k++) if(!a[k]) for(i=2*k;i<n;i+=k) a[i]=1;... Read More
posted @ 2012-11-13 11:14 free斩 Views(304) Comments(0) Diggs(0) Edit
来源:http://my.oschina.net/dianpaopao/blog/83844#include<stdio.h> #include<stdlib.h> #define NMAX 10000000 #define SQRN 10000 int main() { int n; scanf("%d",&n); static char a[NMAX]; unsigned long k,i; for(k=2;k<=SQRN;k++) if(!a[k]) for(i=2*k;i<n;i+=k) a[i... Read More
posted @ 2012-11-13 11:14 free斩 Views(334) Comments(0) Diggs(0) Edit
原题链接:我的来源:2012.11.11CSUST Warm Up(Preparing for the 2013 )(personal):http://acm.hust.edu.cn:8080/judge/contest/view.action?cid=16690#problem/II -Triangle FunTime Limit:1000MSMemory Limit:0KB64bit IO Format:%lld & %lluSubmitStatusDescriptionIn the picture below you can see a triangle ABC. Point D Read More
posted @ 2012-11-11 21:39 free斩 Views(712) Comments(0) Diggs(0) Edit
原题链接:http://poj.org/problem?id=3278算法:bfs+队列+STL(C++)PS:bfs入门题目,好高兴啊,终于会用bfs了。Catch That CowTime Limit:2000MSMemory Limit:65536KTotal Submissions:32679Accepted:10060DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN(0 Read More
posted @ 2012-11-10 00:52 free斩 Views(201) Comments(0) Diggs(0) Edit
原题链接:http://poj.org/problem?id=3278算法:bfs+队列+STL(C++)PS:bfs入门题目,好高兴啊,终于会用bfs了。Catch That CowTime Limit:2000MSMemory Limit:65536KTotal Submissions:32679Accepted:10060DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a pointN(0 Read More
posted @ 2012-11-10 00:52 free斩 Views(203) Comments(0) Diggs(0) Edit
方法:一、枚举(此处所用) 二、用二进制记录下标(尚未实现) 三、类比于玩魔方游戏(思路来自黄超,尚未实现)原题链接:http://poj.org/problem?id=1753Flip GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:21024Accepted:9108DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side ... Read More
posted @ 2012-11-02 19:35 free斩 Views(555) Comments(0) Diggs(0) Edit
方法:一、枚举(此处所用) 二、用二进制记录下标(尚未实现) 三、类比于玩魔方游戏(思路来自黄超,尚未实现)原题链接:http://poj.org/problem?id=1753Flip GameTime Limit:1000MSMemory Limit:65536KTotal Submissions:21024Accepted:9108DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side ... Read More
posted @ 2012-11-02 19:35 free斩 Views(236) Comments(0) Diggs(0) Edit
枚举入门。原题链接:http://poj.org/problem?id=2029POJ http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=716ZOJGet Many Persimmon TreesTime Limit:1000MSMemory Limit:30000KTotal Submissions:2788Accepted:1808DescriptionSeiji Hayashi had been a professor of the Nisshinkan Samurai School in the dom... Read More
posted @ 2012-10-28 15:27 free斩 Views(220) Comments(0) Diggs(0) Edit
仿写的一个简单而傻逼的程序,线性表入门。。。希望把这几个程序弄完了,能搞出个简单的系统来O(∩_∩)O/******************************************* 实验内容二: 1.用C语言定义线性表的链式存储结构(单链表)类型; 2.编制链式存储结构下的线性表的输入程序; 3.编制链式存储结构下线性表的插入算法程序或删除算法程序; 4.编制链式存储结构下的线性表的输出程序; 5.在链式存储结构下编制主程序:输入一个具体的线性表, 然后随意地在表中的任意位置执行插入一个元素 或删除一个元素的操作,最后输出线性表的操作结果。 **********... Read More
posted @ 2012-09-23 16:48 free斩 Views(228) Comments(0) Diggs(0) Edit
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 21 下一页