From 21a0f270efb456348863a6c4087f025d10210359 Mon Sep 17 00:00:00 2001 From: Kirito <1362050620@qq.com> Date: Wed, 27 Apr 2016 10:37:04 +0800 Subject: [PATCH] From http://www.cnblogs.com/d-e-v-i-l/p/5435509.html --- SDUSTOJ/1795_cnblogs.cpp | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 SDUSTOJ/1795_cnblogs.cpp diff --git a/SDUSTOJ/1795_cnblogs.cpp b/SDUSTOJ/1795_cnblogs.cpp new file mode 100644 index 0000000..dd17618 --- /dev/null +++ b/SDUSTOJ/1795_cnblogs.cpp @@ -0,0 +1,53 @@ +/* *********************************************** +Author :devil +Created Time :2016/4/26 16:10:39 +************************************************ */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +using namespace std; +typedef long long LL; +const int N=2e6+7; +int a[N],b[N]; +long long sum[N]; +int main() +{ + //freopen("in.txt","r",stdin); + int n,x; + while(~scanf("%d",&n)) + { + int ma=0; + memset(a,0,sizeof(a)); + memset(b,0,sizeof(b)); + memset(sum,0,sizeof(sum)); + for(int i=0;i