发现了个奇奇怪怪的最优解

P3366 【模板】最小生成树

MARSandEARTH @ 2024-04-13 14:30:18

rt,这里,这算啥啊?


by wangbinfeng @ 2024-04-13 14:33:46

代码发出来呗


by XSJProgrammer @ 2024-04-13 14:34:54

var n,m:longint;
begin
    read(n);
    read(m);
    if(n=5)then
    begin
        if(m=6)then write('orz')
        else if(m=18)then write(729)
        else if(m=11)then write(1255)
        else write(10);
    end
    else if(n=50)then
    begin
        if(m=1717)then write(812)
        else write(576);
    end
    else if(n=500)then
    begin
        if(m=9949)then write(15864)
        else if(m=7264)then write(22851)
        else write(21821);
    end
    else if(n=5000)then
        if(m=198611)then write(77824)
        else if(m=164495)then write(92910)
        else write(81455);
    end.
end.

by __My0217__ @ 2024-04-13 14:35:06

@wangbinfeng

var n,m:longint;
begin
    read(n);
    read(m);
    if(n=5)then
    begin
        if(m=6)then write('orz')
        else if(m=18)then write(729)
        else if(m=11)then write(1255)
        else write(10);
    end
    else if(n=50)then
    begin
        if(m=1717)then write(812)
        else write(576);
    end
    else if(n=500)then
    begin
        if(m=9949)then write(15864)
        else if(m=7264)then write(22851)
        else write(21821);
    end
    else if(n=5000)then
        if(m=198611)then write(77824)
        else if(m=164495)then write(92910)
        else write(81455);
    end.
end.

by wangbinfeng @ 2024-04-13 14:35:19

什么逆天,咋最优解第一页全是Pascal+O2


by wangbinfeng @ 2024-04-13 14:36:47

@My0217 逆天,这得多懒啊

要想抄好歹把pascal改成c++再提交吧


by XSJProgrammer @ 2024-04-13 14:37:47

还有排序那个题,最优解也全都是一样的


by Terrible @ 2024-04-13 14:40:11

依靠套数据打表来抢最优解是吧?

Pascal 在洛谷环境中的启动时间小于 C/C++,所以可能会出现同样是套数据打表,C/C++ 比 Pascal 慢。

这种行为其实对于选手竞赛生涯来说并没有太大帮助。对比赛来说,只要程序能跑过去,运行时间一般不是很重要。


by zcx0628 @ 2024-04-13 17:31:38

%%%


by elpsconr @ 2024-04-23 18:47:14

这有什么意义吗??干脆比赛直接发数据比手速得了


|