浅谈如何爆踩TLEcoders
对付一些速度比老奶奶都慢的评测姬,
除了超级小的常数,往往还不得不使用一些不算办法的办法
比如说这个让人无语的$ACcoders$的评测姬,
当我们感到代码已经无法再卡常的时候,对人生已经近乎绝望的时候,对黄色的小钟表恨之入骨的时候
就可以展开这个折叠的代码,让灰色的人生重新焕发光彩
1 #pragma GCC optimize(1) 2 #pragma GCC optimize(2) 3 #pragma GCC optimize(3) 4 #pragma GCC optimize("Ofast") 5 #pragma GCC optimize("inline") 6 #pragma GCC optimize("-fgcse") 7 #pragma GCC optimize("-fgcse-lm") 8 #pragma GCC optimize("-fipa-sra") 9 #pragma GCC optimize("-ftree-pre") 10 #pragma GCC optimize("-ftree-vrp") 11 #pragma GCC optimize("-fpeephole2") 12 #pragma GCC optimize("-ffast-math") 13 #pragma GCC optimize("-fsched-spec") 14 #pragma GCC optimize("unroll-loops") 15 #pragma GCC optimize("-falign-jumps") 16 #pragma GCC optimize("-falign-loops") 17 #pragma GCC optimize("-falign-labels") 18 #pragma GCC optimize("-fdevirtualize") 19 #pragma GCC optimize("-fcaller-saves") 20 #pragma GCC optimize("-fcrossjumping") 21 #pragma GCC optimize("-fthread-jumps") 22 #pragma GCC optimize("-funroll-loops") 23 #pragma GCC optimize("-fwhole-program") 24 #pragma GCC optimize("-freorder-blocks") 25 #pragma GCC optimize("-fschedule-insns") 26 #pragma GCC optimize("inline-functions") 27 #pragma GCC optimize("-ftree-tail-merge") 28 #pragma GCC optimize("-fschedule-insns2") 29 #pragma GCC optimize("-fstrict-aliasing") 30 #pragma GCC optimize("-fstrict-overflow") 31 #pragma GCC optimize("-falign-functions") 32 #pragma GCC optimize("-fcse-skip-blocks") 33 #pragma GCC optimize("-fcse-follow-jumps") 34 #pragma GCC optimize("-fsched-interblock") 35 #pragma GCC optimize("-fpartial-inlining") 36 #pragma GCC optimize("no-stack-protector") 37 #pragma GCC optimize("-freorder-functions") 38 #pragma GCC optimize("-findirect-inlining") 39 #pragma GCC optimize("-frerun-cse-after-loop") 40 #pragma GCC optimize("inline-small-functions") 41 #pragma GCC optimize("-finline-small-functions") 42 #pragma GCC optimize("-ftree-switch-conversion") 43 #pragma GCC optimize("-foptimize-sibling-calls") 44 #pragma GCC optimize("-fexpensive-optimizations") 45 #pragma GCC optimize("-funsafe-loop-optimizations") 46 #pragma GCC optimize("inline-functions-called-once") 47 #pragma GCC optimize("-fdelete-null-pointer-checks") 48 #pragma G++ optimize(1) 49 #pragma G++ optimize(2) 50 #pragma G++ optimize(3) 51 #pragma G++ optimize("Ofast") 52 #pragma G++ optimize("inline") 53 #pragma G++ optimize("-fgcse") 54 #pragma G++ optimize("-fgcse-lm") 55 #pragma G++ optimize("-fipa-sra") 56 #pragma G++ optimize("-ftree-pre") 57 #pragma G++ optimize("-ftree-vrp") 58 #pragma G++ optimize("-fpeephole2") 59 #pragma G++ optimize("-ffast-math") 60 #pragma G++ optimize("-fsched-spec") 61 #pragma G++ optimize("unroll-loops") 62 #pragma G++ optimize("-falign-jumps") 63 #pragma G++ optimize("-falign-loops") 64 #pragma G++ optimize("-falign-labels") 65 #pragma G++ optimize("-fdevirtualize") 66 #pragma G++ optimize("-fcaller-saves") 67 #pragma G++ optimize("-fcrossjumping") 68 #pragma G++ optimize("-fthread-jumps") 69 #pragma G++ optimize("-funroll-loops") 70 #pragma G++ optimize("-fwhole-program") 71 #pragma G++ optimize("-freorder-blocks") 72 #pragma G++ optimize("-fschedule-insns") 73 #pragma G++ optimize("inline-functions") 74 #pragma G++ optimize("-ftree-tail-merge") 75 #pragma G++ optimize("-fschedule-insns2") 76 #pragma G++ optimize("-fstrict-aliasing") 77 #pragma G++ optimize("-fstrict-overflow") 78 #pragma G++ optimize("-falign-functions") 79 #pragma G++ optimize("-fcse-skip-blocks") 80 #pragma G++ optimize("-fcse-follow-jumps") 81 #pragma G++ optimize("-fsched-interblock") 82 #pragma G++ optimize("-fpartial-inlining") 83 #pragma G++ optimize("no-stack-protector") 84 #pragma G++ optimize("-freorder-functions") 85 #pragma G++ optimize("-findirect-inlining") 86 #pragma G++ optimize("-frerun-cse-after-loop") 87 #pragma G++ optimize("inline-small-functions") 88 #pragma G++ optimize("-finline-small-functions") 89 #pragma G++ optimize("-ftree-switch-conversion") 90 #pragma G++ optimize("-foptimize-sibling-calls") 91 #pragma G++ optimize("-fexpensive-optimizations") 92 #pragma G++ optimize("-funsafe-loop-optimizations") 93 #pragma G++ optimize("inline-functions-called-once") 94 #pragma G++ optimize("-fdelete-null-pointer-checks")