太菜,仅仅能去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. JZOJ5787轨道(容斥+DP)

    JZOJ5787轨道 Description 2018年1月31日,152年一遇的超级大月全食在中国高空出现(没看到的朋友真是可惜),小B看到月食,便对月球的轨道产生了兴趣.他上网查重力加速度的公式, ...

  2. luogu P1495 曹冲养猪(中国剩余定理)

    题意 题解 翻到了一个金句 就跟这句话说得一样,就是个裸题. 所以看模板呗. #include<iostream> #include<cstring> #include< ...

  3. 华为P30系列新增“无线投屏”功能

    3月26日法国巴黎全球首发之后,4月11日华为又移师上海举办2019春季新品发布盛典,新一代拍照旗舰P30.P30 Pro正式登陆国内. 除了感光徕卡四摄带来的“彩色夜视仪“+“望远镜”的震撼拍照效果 ...

  4. pointer-events的css属性。使用该属性可以决定是否能穿透绝对定位元素去触发下面元素的某些行为

    pointer-events的css属性.使用该属性可以决定是否能穿透绝对定位元素去触发下面元素的某些行为,比如当一个元素盖住了某个点击事件时可用. 现在Firefox3.6+/Safari4+/Ch ...

  5. 三 概要模式 3) MR计数器计数 。无 reduce 计数

    计数器模式讲解:         先讲一下,就是说只用 Map 阶段  不需要 Reduce . 也就是说去掉了中间输出,而是Map 直接输出结果.大大提高了 MR 的效率且节省了 MR 中间输出读入 ...

  6. [Angular] Create a ng-true-value and ng-false-value in Angular by controlValueAccessor

    If you're coming from AngularJS (v1.x) you probably remember the ng-true-value and ng-false-value di ...

  7. [Javascript] Required function arguments in Javascript

    In Javascript, all function arguments are optional by default. That means if you ever forget to pass ...

  8. linux安装oracleclient

    1.准备好所须要的安装包,http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html这个网 ...

  9. 智课雅思短语---四、Exploit to the full one’s favorableconditions and avoid unfavorable ones

    智课雅思短语---四.Exploit to the full one’s favorableconditions and avoid unfavorable ones 一.总结 一句话总结:扬长避短 ...

  10. Gojs学习史(一):基本定义

    1. gojs定义 初始化时,先简化gojs本身的方法: var Go = go.GraphObject.make; //简化方法 1.1 画布定义 在声明了Go方法之后,接下来就是定义画布: myD ...