- 博客(8)
- 收藏
- 关注
转载 6个变态的C语言HelloWorld程序<转载>
第一种 #define _________ } #define ________ putchar #define _______ main #define _(a) ________(a); #define ______ _______(){ #define __ ______ _(0x48)_(0x65)_(0x6C)_(0x6C) #define ___ _(0x6F)_(0x2C)_(0x
2013-08-16 09:33:49
634
原创 HDU 2131 Probability
本题考查字符的格式输入问题 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2131 三种格式的 输入比较: (1):while(scanf("%c",&a)!=EOF) { getchar(); scanf("%s",str); getchar(); } (2): while(scanf(
2013-08-05 22:46:07
634
原创 模幂运算 a^b%c
1)模幂运算1—累次计算法: d= ar mod m =(…((((a mod m)*a) mod m)*a)mod m…*a)mod m 算法 long modular_power1(long a, long r, long m){ long d=1, k; a=a % m; for(k=0;k<r; k++)d =(a*d) % m; return
2013-07-24 16:10:42
1199
原创 HDU 2037 今年暑假不AC
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2037 贪心水题。。。 //贪心 选择不相交区间 #include #include #include #include #include using namespace std; struct nood { int s,e; }t[101];//结构体 存区间 boo
2013-07-19 15:38:57
639
原创 HDU 1175 连连看
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1175 使用强剪枝,可以减少时间,比较 #include #pragma comment(linker,"/STACK:102400000,102400000") int map[1010][1010]; int n,m,a,b,flag; void mapbu(int n,int m) //调用输
2013-07-19 11:10:47
723
原创 HDU 1016 Prime Ring Problem
题目大意:给你一个数n(0 题目链接:http://acm.hdu.edu.c#include #include #include #include #include using namespace std; #define MAX 20 int a[MAX],n; int vis[MAX]; int isprime[]={0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1,
2013-07-18 20:22:59
527
转载 修复wubi安装的ubuntu在win7系统重装后丢失引导问题
使用wubi安装ubuntu,为我们win7和ubuntu双系统提供了很多方便 但是一旦windows重装了系统ubuntu引导项就会丢失,很让人蛋疼 下面是我摸索的一个简单的方法,就能修复Ubuntu的引导项 一:首先确认你的ubuntu是在win7下使用wubi安装的。并且保证你的ubuntu在win7重装后没有丢失文件 二:准备好ubuntu的安装镜像
2013-07-15 10:14:05
992
1
原创 HDU 1257 最少拦截系统
最少拦截系统 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12154 Accepted Submission(s): 4795 Problem Description 某国为了防御敌国的导弹袭击,发展出一种导弹拦截系
2013-07-10 18:14:41
660
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人