太菜,仅仅能去Div2.(都做不完 ORZ。。。

各自是 HDU:

5054

pid=5054"> Alice and Bob

5055Bob and math problem

5056Boring count

5057

pid=5057"> Argestes and Sequence

# 1001

碰面仅仅能在坐标中间。

所以推断一下就好了。

#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<algorithm>
#include<map>
#include<stack>
#include<iostream>
#include<list>
#include<set>
#include<vector>
#include<cmath> #define INF 0x7fffffff
#define eps 1e-8
#define LL long long
#define PI 3.141592654
#define CLR(a,b) memset(a,b,sizeof(a))
#define FOR(i,a,b) for(int i= a;i< b ;i++)
#define FOR0(i,a,b) for(int i= a;i>=b ;i--)
#define debug puts("==fuck==")
#define acfun std::ios::sync_with_stdio(false) #define SIZE 20+10
using namespace std; int main()
{
int n,m;
double x,y;
while(~scanf("%d%d%lf%lf",&n,&m,&x,&y))
{
double x1,y1,x2,y2;
x1=x,y1=y; x2=n-x,y2=m-y; if(abs(x1-x2)<=eps&&abs(y1-y2)<=eps)
puts("YES");
else
puts("NO");
}
}

# 1002

检查数字。题解给的是贪心。

我DFS写的。。。竟然没人Hack我……

5

1 0 0 0 0

-1

这组数据小心了。

5

1 1 0 0 0

10001

还有这。

#include<cstdio>
#include<cstring>
#include<string>
#include<queue>
#include<algorithm>
#include<map>
#include<stack>
#include<iostream>
#include<list>
#include<set>
#include<vector>
#include<cmath> #define INF 0x7fffffff
#define eps 1e-8
#define LL long long
#define PI 3.141592654
#define CLR(a,b) memset(a,b,sizeof(a))
#define FOR(i,a,b) for(int i= a;i< b ;i++)
#define FOR0(i,a,b) for(int i= a;i>=b ;i--)
#define debug puts("==fuck==")
#define acfun std::ios::sync_with_stdio(false) #define SIZE 20+10
using namespace std; int a[10],n;
bool cmp(int a,int b)
{
return a>b;
}
int num[101];
bool outflag; void dfs(int m)
{
if(outflag)return;
if(m==n)
{
if(num[m-1]&1)
{
FOR(j,0,n)
printf("%d",num[j]);
printf("\n");
outflag=1;
}
else
return;
}
FOR0(j,9,0)
{
if(a[j])
{
a[j]--;
num[m]=j;
dfs(m+1);
a[j]++;
}
}
} int main()
{
while(~scanf("%d",&n))
{
bool flag=0;
int odd=0;
int even=0;
CLR(a,0);
outflag=0;
FOR(i,0,n)
{
int tmp;
scanf("%d",&tmp);
if(tmp&1)flag=1;
a[tmp]++;
if(tmp&1)odd++;
else if(tmp!=0)even++;
}
if(!flag||(n!=1&&odd==1&&even==0))
{
puts("-1");
continue;
} dfs(0);
}
}

# 1003 知道是维护一个数列。时间复杂度是O(n)的。

ORZ。写了半天,还是没写出来,这周慢慢写吧,先挂这。

#

wait...

#

# 1004 我用线段树的,结果MLE。卡内存有意思?

有人说能够试试 unsigned short 看能不能过。

慢慢交吧。

反正在HDU41页。

#

wait...

#

BestCoder Round #11 (Div. 2)的更多相关文章

  1. BestCoder Round #11 (Div. 2) 题解

    HDOJ5054 Alice and Bob Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/O ...

  2. BestCoder Round #11 (Div. 2) 前三题题解

    题目链接: huangjing hdu5054 Alice and Bob 思路: 就是(x,y)在两个參考系中的表示演全然一样.那么仅仅可能在这个矩形的中点.. 题目: Alice and Bob ...

  3. hdu 5636 搜索 BestCoder Round #74 (div.2)

    Shortest Path  Accepts: 40  Submissions: 610  Time Limit: 4000/2000 MS (Java/Others)  Memory Limit: ...

  4. hdu5631 BestCoder Round #73 (div.2)

    Rikka with Graph  Accepts: 123  Submissions: 525  Time Limit: 2000/1000 MS (Java/Others)  Memory Lim ...

  5. hdu5630 BestCoder Round #73 (div.2)

    Rikka with Chess  Accepts: 393  Submissions: 548  Time Limit: 2000/1000 MS (Java/Others)  Memory Lim ...

  6. (BestCoder Round #64 (div.2))Array

    BestCoder Round #64 (div.2) Array 问题描述 Vicky是个热爱数学的魔法师,拥有复制创造的能力. 一开始他拥有一个数列{1}.每过一天,他将他当天的数列复制一遍,放在 ...

  7. BestCoder Round #69 (div.2) Baby Ming and Weight lifting(hdu 5610)

    Baby Ming and Weight lifting Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K ( ...

  8. BestCoder Round #68 (div.2) tree(hdu 5606)

    tree Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submis ...

  9. hdu5635 BestCoder Round #74 (div.2)

    LCP Array  Accepts: 131  Submissions: 1352  Time Limit: 4000/2000 MS (Java/Others)  Memory Limit: 13 ...

随机推荐

  1. Calling convention-调用约定

    In computer science, a calling convention is an implementation-level (low-level) scheme for how subr ...

  2. 3Ds Max制作克劳族少女教程

    作者:Andrius Balciunas 使用软件:3ds Max, ZBrush 3ds Max下载:http://www.xy3dsmax.com/xiazai.html ZBrush下载:htt ...

  3. 【BZOJ4071】【APIO2015】巴邻旁之桥

    题意: Description 一条东西走向的穆西河将巴邻旁市一分为二,分割成了区域 A 和区域 B. 每一块区域沿着河岸都建了恰好 1000000001 栋的建筑,每条岸边的建筑都从 0 编号到 1 ...

  4. luogu P2664 树上游戏(点分治)

    点分治真是一个好东西.可惜我不会 这种要求所有路经的题很可能是点分治. 然后我就不会了.. 既然要用点分治,就想,点分治有哪些优点?它可以\(O(nlogn)\)遍历分治树的所有子树. 那么现在的问题 ...

  5. luogu P3674 小清新人渣的本愿(莫队+bitset)

    这题是莫队维护bitset. 然而我并不会bitset以前讲过认为不考就没学 我真的太菜了. 首先维护一个权值的bitset--s. 操作3比较简单,我们可以\(\sqrt{x}\)枚举约数然后判断就 ...

  6. bootstrap 因跳页黑色背景无法关闭

    只需要在跳页之前加上如下代码: $(".modal-backdrop").remove();

  7. SpringBoot实战(三)代码热部署

    每次代码改动后都需要重新手动Run项目,心累,在网上找了下,发现SpringBoot提供了热部署的方案,改动代码后自动编译打包,现在将热部署的配置方法记下来: 第一步:在pom.xml中添加依赖,导入 ...

  8. 面试题:Student s = new Student();在内存中做了哪些事情?即创建一个对象做了哪些事情

    lStudent s = new Student();在内存中做了哪些事情? •载入Student.class文件进内存(方法区) •在栈内存为s开辟空间 •在堆内存为学生对象开辟空间 •对学生对象的 ...

  9. Android体验高扩展艺术般的适配器

    前言 本篇文章带大家体验一下一种具有扩展性的适配器写法. 这个适配器主要用于Item有多种的情况下.当然仅仅有一种类型也是适用的 实现 毫无疑问我们要继承BaseAdapter,重写getCount, ...

  10. h5 离线存储