自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(18)
  • 收藏
  • 关注

原创 nefu 2 猜想(素数&&筛选)

题目链接:http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=2题目中文题目,很好理解,就是要判断一个偶数有多少对素数相加之和为该偶数。只要把素数全部标记就好了。#include#include#include#includeusing namespace std;const int m

2014-02-09 14:07:14 641

原创 ZOJ 2541 Goods Transportation

题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1523题目大意:用传送带,传送物品,有m个起点,n个目的的,要你计算最大的物品传送量和最少的花费。贪心,是贪心吗?应该是的。#includeusing namespace std;int Sc[10005];int De[10

2014-02-07 15:12:35 990

原创 ZOJ 3058 The War(简单贪心)

题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=4351题目大意:有N个士兵,每个士兵所能拿动的武器为【minWi, maxWi】,为了能打胜战,要尽可能多的拿到武器。问你如何能拿到更多。其实这题和那个活动时间安排极其相似。比较简单,排序就好了。#include#include#include#i

2014-02-07 12:08:57 831

原创 hdoj 畅通工程(简单最小生成树问题)

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1863题目为中文题目,简单易懂,从题目就可以很容易的知道是最小生成树,也可以说就是纯模板题。但还是需要了解和掌握模板。#include#include#includeusing namespace std;const int MAXN=0x3f3f3f3

2014-02-06 19:27:44 721

原创 codeforces Strings of Power

题目链接:http://codeforces.com/problemset/problem/318/B题目大意:字符串匹配问题。找heavy和metal搭配的总数。#include#include#includeusing namespace std;int main(void){ string str; int i; cin>>str;

2014-02-05 16:40:35 774

原创 codeforces Way Too Long Words

题目链接:http://codeforces.com/problemset/problem/71/A题目大意:给你一个字符串,若长度小于等于10,原样输出,反之,输出首字母和字符串长度-2和最后一个字母。#include#include#includeusing namespace std;char ch[105];int main(void){

2014-02-05 15:01:43 915

原创 codeforces Fox and Box Accumulation

http://codeforces.com/problemset/problem/388/A题目大意:有n个箱子,每个箱子都是同宽等高的,但承受压力的能力不同,压力的大小一箱子的表面第一个箱子的大小有关,与表面第2第3.....均无关,要把这些箱子分堆,看看能分成多少堆。#include#includeusing namespace std;int n;int A

2014-02-05 11:29:33 930

原创 codeforces Fox and Cross

题目链接:http://codeforces.com/problemset/problem/389/B题目大意:给你一个n*n的方形板块,在上面铺上且只能铺”.“、"#"两只中的一种或两种,要你在上面把”#“全部用上,组合成十字,用过的”#“不能再用。‘’题目简单易懂,直接搜索就好了。#includeusing namespace std;char ch[

2014-02-05 10:29:52 816

原创 codeforecs Fox and Number Game

题目链接:http://codeforces.com/problemset/problem/389/A非常简单的一题,也非常蛋疼的一题。#includeint GCD(int a, int b){ return b==0? a : GCD(b, a%b);}int main(){ int n, x, y, i; scanf("%d%d", &n, &x);

2014-02-04 20:58:16 861

原创 codeforces Letter

题目链接:http://codeforces.com/problemset/problem/43/B题目:字符匹配的问题。#include int main(void){ char ch[205]; int c[128]={}; char ch1[205]; int i; gets(ch); for(i=0;ch[i];i++) c[ch[i]]++;

2014-02-03 23:07:35 846

原创 codeforces Football

题目链接:http://codeforces.com/problemset/problem/43/A题目:两个队比赛,看看哪个队赢。字符串的比较和计数。#include#include#includeusing namespace std;int main(void){ int n; int i; string str[105];

2014-02-03 22:17:36 815

原创 codeforces Ultra-Fast Mathematician

题目链接:http://codeforces.com/problemset/problem/61/A题目意思我也不知道,好长。没看,但一看样例就知道了,直接AC。#include#include#includeusing namespace std;char ch1[101];char ch2[101];char ch3[101];int main(void){

2014-02-03 18:36:51 719

原创 codeforces Word

题目链接‘:http://codeforces.com/problemset/problem/59/A题目:给你一个大小写混合的长度不超过100的字符串,按照题目给定的要求,将其转换为大写字符串或者小写字符串,大写字符个数不小写字符个数多时,就转换为大写的,小写字符大于或者等于大写字符 时,就转换为小写字符!#include#include#includeusing

2014-02-03 16:54:51 922

原创 codeforces Calendar

题目链接:http://codeforces.com/problemset/problem/58/D题目:有 n个城市(n为偶数),然后n个城市的名字,用这些名字来出版这么个东西( calendar ),要求按照(n/2)行输出,且每行要等长。#include#include#include#include#includeusing namespace std;

2014-02-03 11:50:02 637

原创 codeforces Coins

题目链接:http://codeforces.com/problemset/problem/58/B题目大意:给你一张钱吧,然后让你找钱,(类似于贪心算法的找钱,尽可能的找最大值的),但一定要是倍数。#includeusing namespace std;int n;int main(void){ int i,j; scanf("%d",

2014-02-02 21:21:08 771

原创 codeforces Chat room

题目链接:http://codeforces.com/problemset/problem/58/A题目要求:给你一个字符串,要你在这个字符串里面看看能不能找到一个“hello”,当然按顺序来找,若能够,则输出“YES”, 否则“NO”。#include#includeusing namespace std;char ch[105];const char ch1[6]={

2014-02-02 21:01:19 1020

原创 codeforces Chess

题目链接:http://codeforces.com/problemset/problem/38/B题目大意:给你两颗棋子,分别为车和士,在8*8的方块中,该死了你两颗棋子的位置(这两颗棋子不会受到对方的攻击),要你在摆一颗棋子,问你摆的方法有几种。#include#includeusing namespace std;int main(){ char c;

2014-02-02 14:10:35 764

原创 codeforces Army

题目链:http://codeforces.com/problemset/problem/38/A题目大意:就是说有有有一个人想从A等级上升到B等级,然后给你每上升一级所需要的年份,问你一共需要多少年。本人错误的理解为第一个所给的年份就是从A开始的,所以直接累加就好了,然后WA之,在看题目,才明白非也。应该从i=a,直接累加到B就好了。#include

2014-02-02 11:45:51 626

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除