记录编号 320532 评测结果 AAAAAAAAAA
题目名称 [HZOI 2015]快速柚立叶变换 最终得分 100
用户昵称 Gravatar_Itachi 是否通过 通过
代码语言 C++ 运行时间 0.000 s
提交时间 2016-10-12 08:02:34 内存使用 0.00 MiB
显示代码纯文本
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
#define Tree_in_Tree_with_chairman_Tree long long
const int Tree_in_Tree_with_chairman_tree=250*250*2*2*2*2;
Tree_in_Tree_with_chairman_Tree a[Tree_in_Tree_with_chairman_tree];
Tree_in_Tree_with_chairman_Tree sum[Tree_in_Tree_with_chairman_tree];
Tree_in_Tree_with_chairman_Tree us[Tree_in_Tree_with_chairman_tree];
Tree_in_Tree_with_chairman_Tree n;
void _tree_in_Tree_With_chairman_tree(){
	scanf("%lld",&n);
	int tree_in_tree_with_Chairman_tree;
	int tree_in_tree_with_CHairman_tree;
	for(tree_in_tree_with_Chairman_tree=1;
		tree_in_tree_with_Chairman_tree<=n;
		tree_in_tree_with_Chairman_tree++){
			scanf("%lld",&a[tree_in_tree_with_Chairman_tree]);
			sum[tree_in_tree_with_Chairman_tree]=
			(sum[tree_in_tree_with_Chairman_tree-1]+
			a[tree_in_tree_with_Chairman_tree])%n;
			if(!sum[tree_in_tree_with_Chairman_tree]){
				for(tree_in_tree_with_CHairman_tree=1;
					tree_in_tree_with_CHairman_tree<=
					tree_in_tree_with_Chairman_tree;
					tree_in_tree_with_CHairman_tree++)
						printf("%lld\n",a[tree_in_tree_with_CHairman_tree]);
				return;
			}
			if(us[sum[tree_in_tree_with_Chairman_tree]]){
				for(tree_in_tree_with_CHairman_tree=
					us[sum[tree_in_tree_with_Chairman_tree]]+1;
					tree_in_tree_with_CHairman_tree<=
					tree_in_tree_with_Chairman_tree;
					tree_in_tree_with_CHairman_tree++)
						printf("%lld\n",a[tree_in_tree_with_CHairman_tree]);
				return;
			}
			us[sum[tree_in_tree_with_Chairman_tree]]=
				tree_in_tree_with_Chairman_tree;
		}
	puts("Tree in Tree with chairman tree.");
}
bool tree_in_Tree_With_chairman_tree();
bool Tree_In_Tree_With_chairman_tree=tree_in_Tree_With_chairman_tree();
int main(){;}
bool tree_in_Tree_With_chairman_tree(){
#define trEE_in_TrEE_With_chairman_trEE treE_in_TreE_With_chairman_treE
#ifdef trEE_in_TrEE_With_chairman_trEE
	freopen("A_long_name_without_mean.in","r",stdin);
	freopen("A_long_name_without_mean.out","w",stdout);
#endif
	_tree_in_Tree_With_chairman_tree();
#ifndef trEE_in_TrEE_With_chairman_trEE
	getchar(),getchar();
#endif
	fclose(stdin),fclose(stdout);
}