F.A.Qs Home ProblemSet Status Ranklist Contest LoginRegister
Notice:祝各位Oier新年快乐,Rp++!
大视野在线测评-欢迎您
[ New Thread ]
Problem 3509 >> 震惊!循环展开只是个噱头!
EdwardFrog @ 2018-01-12 08:38:36
[ Quote ] [ Edit ] [ Delete ] 1#
我把展开层数改成一层也跑的飞快哎...
核心代码:
tmp=0;
while(p1<=lim1&&p2>=lim2)tmp+=(*p1)*(*p2),p1++,p2--;
ans+=tmp;
变成真·大暴力了,但只比展开15层慢了1s,是不是说明循环展开用处没有想象的那么大?
GXZlegend @ 2018-01-12 08:48:03
[ Quote ] [ Edit ] [ Delete ] 2#
震惊!
我分块FFT过不去的题纯暴力竟然能过!
nzhtl1477 @ 2018-01-12 13:41:54
[ Quote ] [ Edit ] [ Delete ] 3#
本来循环展开就没什么用。。
Marco @ 2018-01-12 23:32:32
[ Quote ] [ Edit ] [ Delete ] 4#
我怎么不太信啊,姿势不对?大雾)
nzhtl1477 @ 2018-01-13 10:25:07
[ Quote ] [ Edit ] [ Delete ] 5#
bzoj不能用avx
nzhtl1477 @ 2018-01-13 10:25:23
[ Quote ] [ Edit ] [ Delete ] 6#
普通的循环展开优化不明显吧
iloi @ 2018-01-13 11:41:46
[ Quote ] [ Edit ] [ Delete ] 7#
interesting
EdwardFrog @ 2018-01-13 16:32:34
[ Quote ] [ Edit ] [ Delete ] 8#
@Marco
循环展开跑11s多,大暴力12s
[Top] [Previous Page] [Next Page]

HOME Back