RQ254 占内存的递归函数
RQ140 分配时间

RQ157 晚餐队列安排

Uxuard posted @ 2011年8月16日 00:19 in 水题 with tags OI RQNOJ 水题 , 3157 阅读

记录下就好了

 

#include <stdio.h>

using namespace std;
#define maxn 100000
int rec[maxn][2];

int main()
{
		int n,t,ans,r1,r2;
		ans=0xffffff;
		r1=r2=0;
		scanf("%d",&n);
		for (int i=0;i<n;i++)
		{
				scanf("%d",&t);
				if (t==1) r1++; else r2++;
				rec[i][0]=r1;
				rec[i][1]=r2;
		}
		for (int i=0;i<n;i++)
				if (rec[i][1]+(r1-rec[i][0])<ans)
								ans=rec[i][1]+(r1-rec[i][0]);
		printf("%d",ans);
}
home cleaning dubai 说:
2022年1月26日 19:00

Since the areas are bare (or even nearly bare), it’s time for you to help your house be or condo look better still than this did when you initially moved within. Many condo and home contracts need a “broom-clean” while some require a detailed list that covers from the stove towards the baseboards.

housekeeping service 说:
2022年4月23日 18:41

Getting a party might be hectic. There are merely so lots of things to keep up. The same goes for if your party’s around. You often need assist with clean up the mess. For that reason, if anyone hire a new part-time housemaid throughout Dubai you will definately get all the enable you to need the two with coordinating and after-party cleanup. They will manage every instant detail.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter