| 题目名称 | 2500. [HZOI 2015]快速橘立叶变换 | 
|---|---|
| 输入输出 | Fast_Orange_Transform.in/out | 
| 难度等级 | ★★★ | 
| 时间限制 | 1000 ms (1 s) | 
| 内存限制 | 2 MiB | 
| 测试数据 | 10 | 
| 题目来源 |  | 
| 开放分组 | 全部用户 | 
| 提交状态 | |
| 分类标签 | |
| 分享题解 | 
| 通过:3, 提交:20, 通过率:15% | ||||
|  | 100 | 0.023 s | 0.31 MiB | C++ | 
|  | 100 | 0.029 s | 0.31 MiB | C++ | 
|  | 100 | 0.045 s | 0.31 MiB | C++ | 
|  | 80 | 0.022 s | 0.31 MiB | C++ | 
|  | 80 | 0.025 s | 104.10 MiB | C++ | 
|  | 80 | 0.041 s | 4.13 MiB | C++ | 
|  | 80 | 0.331 s | 0.30 MiB | C++ | 
|  | 0 | 0.000 s | 0.00 MiB | C++ | 
|  | 0 | 0.000 s | 0.00 MiB | C++ | 
|  | 0 | 0.000 s | 0.00 MiB | C++ | 
| 关于 快速橘立叶变换 的近10条评论(全部评论) | ||||
|---|---|---|---|---|
| 
没听三楼的话,80了 一 定 要 开 栈 !!! 
2016-10-17 16:31
5楼
 | ||||
| 
原来的题面是pysharp语言,但是农场主看不懂,于是就改成这样了= = 
2016-10-17 16:24
4楼
 | ||||
| 
好吧怪我读错题了 顺便吐槽一句题中给出的程序是会CE的 
2016-10-17 16:07
3楼
 | ||||
| 
c++玄兽在DFS时一定要记得开栈那; 不开栈就80!!!! 
2016-10-17 16:07
2楼
 | ||||
| 
这。。代码是在归并排序求逆序对吗?至于其他的我完全看不懂啊。。果然我太辣鸡了。。 
2016-10-17 15:54
1楼
 | ||||
Fast_Orange_Transform.in  
输出文件:Fast_Orange_Transform.out  
简单对比
from __this__ program module::
from stdlibrary program moudle::
from stdio program moudle::
object long c=0;
object long[] A=new long[N];
function:object long redescribe(object long l,object long r)
begin
	object long x=A[l],i=l-1,j=r+1,t;
	while(true)
	begin
		do begin --j;++c; end while(A[j]>x);
		do begin ++i;++c; end while(A[i]<x);
		if(i<j) <stdlibrary.algorithm>swap((quote)A[i],(quote)B[i]),
		else exitwith j;
	end;
end;
function:const void describe(object long l,object long r)
begin
	object long N;
	if(l<r)
	begin
		N=redescribe(l,r);
		describe(l,N);
		describe(N+1,r);
	end;
end;
ENTRANCE object report Main(const void 0)
begin
	
	object long N=__debuger_next_long();
	A[1:]=<stdio>input([range(N)]);
	describe(1,N);
	if(c==(N*N+3*N-4)/2)output("Chinese inland!"),
	else output("Table in table with chairman table!");
	report  "completed";
end;
reset ::stdio
reset ::stdlibrary
reset ::__this__
给出N以及长度为N的数组A,输出其能让橘子报告"Chinese inland!"的新数组排列。
第一行表示测试数据的组数K
然后接下来K组测试数据
每组第一行一个整数N
然后一行N个数描述了数组A
对于每组测试数据输出一行,为原数组中的各个数重新排列后的能使橘子输出"Chinese inland"的新数组的各个数在原数组中的下标
Test case 1
2
5 9
2 1
输入中只有1组测试数据.....(K=1)
第1组测试数据的包含2个数.....(N=2)
这两个数分别为5与⑨.....(i=1,i=2)
经运算,得到新数组应为9 5.其原本的序号为2 1.....(i=2,i=1)
0<K≤5
0≤N≤500000
数组中的各个数均在int(python)范围内事实上是在pascal int64范围内
Ural 1082