最新文章专题视频专题问答1问答10问答100问答1000问答2000关键字专题1关键字专题50关键字专题500关键字专题1500TAG最新视频文章推荐1 推荐3 推荐5 推荐7 推荐9 推荐11 推荐13 推荐15 推荐17 推荐19 推荐21 推荐23 推荐25 推荐27 推荐29 推荐31 推荐33 推荐35 推荐37视频文章20视频文章30视频文章40视频文章50视频文章60 视频文章70视频文章80视频文章90视频文章100视频文章120视频文章140 视频2关键字专题关键字专题tag2tag3文章专题文章专题2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章专题3
当前位置: 首页 - 科技 - 知识百科 - 正文

BestCoderRound#11(Div.2)_html/css

来源:动视网 责编:小采 时间:2020-11-27 15:55:52
文档

BestCoderRound#11(Div.2)_html/css

BestCoderRound#11(Div.2)_html/css_WEB-ITnose:太菜,只能去Div2.(都做不完 ORZ。 分别是 HDU: 5054 Alice and Bob 5055 Bob and math problem 5056 Boring count 5057 Argestes and Sequence # 1001 碰面只能在坐标中间。 所以判断一下就好了。 #inclu
推荐度:
导读BestCoderRound#11(Div.2)_html/css_WEB-ITnose:太菜,只能去Div2.(都做不完 ORZ。 分别是 HDU: 5054 Alice and Bob 5055 Bob and math problem 5056 Boring count 5057 Argestes and Sequence # 1001 碰面只能在坐标中间。 所以判断一下就好了。 #inclu


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


分别是 HDU:

5054 Alice and Bob

5055 Bob and math problem

5056 Boring count

5057 Argestes and Sequence


# 1001

碰面只能在坐标中间。

所以判断一下就好了。

#include#include#include#include#include#include#include#include#include#include#include#include#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+10using 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#include#include#include#include#include#include#include#include#include#include#include#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+10using 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...

#

文档

BestCoderRound#11(Div.2)_html/css

BestCoderRound#11(Div.2)_html/css_WEB-ITnose:太菜,只能去Div2.(都做不完 ORZ。 分别是 HDU: 5054 Alice and Bob 5055 Bob and math problem 5056 Boring count 5057 Argestes and Sequence # 1001 碰面只能在坐标中间。 所以判断一下就好了。 #inclu
推荐度:
标签: 11 it div
  • 热门焦点

最新推荐

猜你喜欢

热门推荐

专题
Top