- 博客(12)
- 资源 (3)
- 问答 (4)
- 收藏
- 关注
原创 280 核反应堆
地址:http://acm.swust.edu.cn/problem/0280/低能质点撞击核子时,也是放出2个高能质点,1个低能质点,,然后高能的又需要刚出3个高能的,1个低能的。#include#includeint main(){int time;while(scanf("%d",&time)!=EOF && time!=-1){int i;int h
2014-12-31 09:35:52 550
原创 140 挑战题之排列生成
地址:http://acm.swust.edu.cn/problem/0140/这是一个深度搜索的题,一个深搜就好。#include#includeint n,arr[10],book[10];void dfs(int step){int i;if(step==n+1){for(i=1;i{printf("%d",arr[i]);}print
2014-12-30 19:44:06 541
原创 700 Delete Numbers
地址:http://acm.swust.edu.cn/problem/0700/要考虑是怎样删除的,从首位开始只要相邻的两个数进行比较,找到大的数,然后将这个数之后的所有数前移一位,将这个数覆盖就是将这个数删除了。#include#includeint main(){void res(char str[],int num);char str[110];int num
2014-12-30 18:57:30 782
原创 254 翻煎饼
地址:http://acm.swust.edu.cn/problem/0254/这个题是要将大的放在下边,先查找最大的数,如果这个数在最后,不用进行操作,如果这个数在第一位,只需要翻一次,即数组整体换位,否则要进行两次交换,第一次将这个数换到第一位,然后再转至数组,使得这个数变为最后一个,这个数就不用再管。#includeint main(){void add(int a[],
2014-12-28 16:25:17 1584
原创 1089 我很11
地址:http://acm.swust.edu.cn/problem/1089/这个题是查找两个数之间包含11,或者是11的倍数的数一共有多少个。#includeint main(){void judge(int a,int b);int num1,num2;while(scanf("%d%d",&num1,&num2)!=EOF){int min=num1>n
2014-12-26 23:10:11 524
原创 740 字符串处理
地址:http://acm.swust.edu.cn/problem/0740/这个题是一定要用%X输出吗??我用的%c输出结果就是错误的。。。。#include#includeint main(){void turn(char a[],int n);char str[210];while(scanf("%s",str)!=EOF){int len=strl
2014-12-24 22:10:17 409
原创 237 Calculate Sum-Of-Absolute-Differences
地址:http://acm.swust.edu.cn/problem/0237/这个题主要是时限的问题,如果用2重循环一定超时,所以要找数字之间的关系。#include#include#include#includeusing namespace std;int main(){void result(int a[],int n);int N;while(
2014-12-24 18:32:27 1194
原创 300 方程式
地址:http://acm.swust.edu.cn/problem/0300/题意 a*x1*x1+b*x2*x2+c*x3*x3+d*x4*x4=0 根据abcd的范围,求(x1,x2,x3,x4)一共有多少组#include#includeint arr1[1000010],arr2[1000010];int main(){int a,b,c,d;while(
2014-12-24 11:47:33 487
原创 01背包
题意叙述:总共有N件物品,一个背包总空间为V,物品标号1~n,第 i 物品对应占空间room,价值weight。现向其中放入物品,问可以放入的最大价值。#includestruct bag{int room;int weight;};//room 是每一个占的空间,weight是每一个个的价值int main(){struct bag arr[100
2014-12-20 17:05:57 370
原创 字符加密
地址:http://acm.swust.edu.cn/problem/571/这个题只要按照题中意思转换,加好判断条件就可以了。不过咱们学校oj无法用gets();而且用scanf不能输入空格,所以用fgets();函数,需要注意这个函数后边有 \n\0两个字符,所以 i #include#includeintmain(){charstr[
2014-12-18 22:12:44 428 1
原创 猴子报数
地址:http://acm.swust.edu.cn/problem/142/这个题可以用数组就行操作,将每一次退出的猴子依次放到另一个数组中,最后再输出。#include#includeint main(){ int N; while(scanf("%d",&N)!=EOF) { int ar
2014-12-18 21:50:25 650
原创 大整数加法
地址:http://acm.swust.edu.cn/problem/434这个题主要是运用字符数组,从两个数组的最后一位进行相加,和如果大于9就要向前进位,所以除了要输入的两个数组外还要有一个存储和的数组,且这个数组的大小要大于输入的最大的数组。#include#includechar str3[3001];int main(){ i
2014-12-05 18:44:52 440
Localized Dialogs & Cutscenes - Editor Only
2015-09-03
html写下载文件 在手机上不能用
2018-12-24
mysql 模糊查询不使用索引?explain显示用到索引
2018-03-15
**关于集合扩容问题**
2017-11-30
WebSocket客户端与Java的Socket服务器通信
2017-05-25
TA创建的收藏夹 TA关注的收藏夹
TA关注的人