自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小马的博客

最穷不过要饭,不死终会出头

  • 博客(21)
  • 资源 (6)
  • 收藏
  • 关注

原创 BestCoder Round #67 (div.2)总结

1001 N bulbs    Accepts: 275    Submissions: 1237  Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) 问题描述 N个灯泡从左到右排成一排,左边的是第一个,右边的最后一个,下标从1到n。有些开着,有

2015-12-26 22:54:52 353

原创 Educational Codeforces Round 4 总结

A. The Text Splitting time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given the string s of length n

2015-12-26 01:34:45 469

原创 Codeforces Round #336 (Div. 2) 总结

A. Saitama Destroys Hotel time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Saitama accidentally destroyed a h

2015-12-24 18:50:30 575

原创 Codeforces Round #293 (Div. 2) 总结

A. Vitaly and Strings time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vitaly is a diligent student who never

2015-12-22 15:15:46 452

原创 Codeforces Round #226 (Div. 2) 总结

A A. Bear and Raspberry time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The bear decided to store some

2015-12-22 13:32:06 563

原创 Codeforces Round #269 (Div. 2) 总结

A A. MUH and Sticks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Two polar bears Menshykov

2015-12-18 16:45:47 435

原创 Codeforces Round #262 (Div. 2) 总结

A A. Vasya and Socks time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has n pairs of soc

2015-12-14 19:10:11 268

原创 Codeforces Round #234 (Div. 2) 总结

A A. Inna and Choose Options time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There always is

2015-12-11 12:06:30 569

原创 Codeforces Round #335 (Div. 2) 总结

A:题意是:没两个一样的颜色,可以转换成另一种颜色,给你3中颜色a,b,c。问能否构成x,y,z。(x,y,z分别代表三种颜色) 很简单,直接模拟就是了 #include #include using namespace std; const int maxm=1e5+10; struct node { int x,id; }t[maxm]; int cmp(node p,node q

2015-12-10 11:37:34 415

原创 Codeforces Round #302 (Div. 2) A. Set of Strings

解:此题是一道字符串题,要求用指定数目的子串前后拼接构成一个整串,在拼接时需要保持每个子串首字母不一样,可以用大小为26的数组来标记每个子串的首字母,接下来再进行拼接判断即可。 #include #include #include using namespace std; const int maxm=1e3+10; char s[maxm]; int vis[maxm]; int vit[ma

2015-12-08 20:22:14 292

原创 coderforce 489B B. BerSU Ball

题意:每两个跳舞的人可以配对,并且他们两个的绝对值只差小于等于1。求最多匹配多少对 解:排个序,配对就完了#include #include #include #include using namespace std; const int maxm=1e3+10; int a[maxm]; int b[maxm]; int main() { int n; while(scanf(

2015-12-08 19:42:34 419

原创 POJ 2828 Buy Tickets(线段树)

题意:n个人排队,每个人有一个权值,给出他们插队的位置,求最后的顺序,按顺序输出权值。 解:逆着想,最后一个人插队后, 他的位置就是确定了下来的。倒数第二个人插的话,位置在最后一个的前面,最后一个对他无影响,位置在最后一个后面,则最后一个对他有影响,他必须往后移一位。#include #include #include using namespace std; const int maxm=2e

2015-12-08 16:56:36 278

原创 BestCoder Round #65 ZYB's Premutation

ZYB's Premutation    Accepts: 218    Submissions: 983  Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) 问题描述 ZYBZYB有一个排列PP,但他只记得PP中每个前缀区间的逆序对数,现在他

2015-12-06 01:28:11 286

原创 BestCoder Round #65 ZYB's Game

ZYB's Game    Accepts: 672    Submissions: 1207  Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) 问题描述 ZYBZYB在远足中,和同学们玩了一个“数字炸弹”游戏:由主持人心里想一个在[1,N][1

2015-12-06 01:23:34 310

原创 BestCoder Round #65 ZYB's Biology

ZYB's Biology    Accepts: 848    Submissions: 1199  Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) 问题描述 ZYB(ZJ-267)ZYB(ZJ−267)在NOIPNOIP拿到60060

2015-12-06 01:21:24 470

原创 coderforce 484A Bits(强大的位运算)

题意:求区间中m-n中每个数转换成二进制中一的个数最多的一个#include #include #include using namespace std; #define LL long long int main() { int t; scanf("%d",&t); while(t--) { LL m,n; scanf("%lld%

2015-12-03 11:55:59 407

原创 coderforce 482A. Diverse Permutation

题意:1-n的排列,求相邻值的差值有K种的排列 解:构造#include #include #include using namespace std; int main() { int n,k; while(scanf("%d%d",&n,&k)!=EOF) { for(int i=1;i<=n-k;i++) { p

2015-12-02 20:54:06 369

原创 coderforce 483A Counterexample

题意:给定l和r,找出满足条件 l ≤ a b c ≤ r  的a, b, c,且a和b互素,b和c互素,但a和c不互素。 解:三层for循环暴力水过#include #include #include using namespace std; #define LL long long LL gcd(LL a,LL b) { LL temp; while(b) {

2015-12-02 20:00:05 317

原创 Codeforces Round #334 (Div. 2) C. Lieges of Legendre

题意:给你一个字符串,你可以使得一个连续的01串翻转过来,然后问你最长的01相隔的子序列(不连续)的长度为多少 解:答案一定是max(len+2,n),len为原来01串的最长长度#include #include #include using namespace std; const int maxm=1e5+10; char s[maxm]; int main() { int n;

2015-12-02 17:05:09 310

原创 Codeforces Round #334 (Div. 2) B. More Cowbell

题意:要将n个物品放在k个背包里,且,每个背包最多装两个物品,每个背包的容积大小相同,求背包的容积最小为多少。 解:贪心的思想,先将小的跟大的放在一起,让后求最大。#include #include #include using namespace std; const int maxm=1e5+10; int a[maxm]; int main() { int n,k; whi

2015-12-02 16:09:37 273

原创 Codeforces Round #334 (Div. 2) A. Uncowed Forces

题意:求最终选手得分#include #include #include using namespace std; const int maxm=10; int a[maxm]; int b[maxm]; int m,n; int main() { int sum=0; for(int i=0;i<5;i++) { scanf("%d",&a[i]);

2015-12-02 13:08:20 312

Android 照片查看器最简单的实现

Android 照片查看器最简单的实现

2016-05-11

ListView显示,跳转

ListView显示,跳转

2016-05-11

Android对话框

Android 点击一个按钮,相应弹出该对话框

2016-05-09

ListView把数据显示到屏幕

ListView把数据显示到屏幕

2016-05-08

Android实现查询数据库,把数据库内容显示到屏幕

Android实现查询数据库,把数据库内容显示到屏幕

2016-05-08

我的解题报告NO.2并查集 题解题报告

我的做题是学长给我们发的解题报告,里面可能有错哦

2015-07-11

空空如也

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

TA关注的人

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