简直卡内存!

测试数据 #0: Accepted, time = 0 ms, mem = 1012 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 1008 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 1008 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 1012 KiB, score = 10
测试数据 #4: Accepted, time = 46 ms, mem = 1008 KiB, score = 10
测试数据 #5: Accepted, time = 46 ms, mem = 1012 KiB, score = 10
测试数据 #6: Accepted, time = 46 ms, mem = 1008 KiB, score = 10
测试数据 #7: Accepted, time = 15 ms, mem = 1012 KiB, score = 10
测试数据 #8: Accepted, time = 31 ms, mem = 1008 KiB, score = 10
测试数据 #9: Accepted, time = 31 ms, mem = 1008 KiB, score = 10
Accepted, time = 215 ms, mem = 1012 KiB, score = 100
10万数组+堆排序居然过了。。

10 条评论

  • @ 2016-12-07 13:08:05

    map

  • @ 2015-01-25 21:28:35

    我开了5个变量貌似都要400KB+、、

  • @ 2015-01-25 21:27:38

    数据加强+500Kb的内存吧- -。。

  • @ 2015-01-24 15:03:54

    测试数据 #0: Accepted, time = 15 ms, mem = 256 KiB, score = 10
    测试数据 #1: Accepted, time = 0 ms, mem = 252 KiB, score = 10
    测试数据 #2: Accepted, time = 0 ms, mem = 256 KiB, score = 10
    测试数据 #3: Accepted, time = 0 ms, mem = 256 KiB, score = 10
    测试数据 #4: Accepted, time = 15 ms, mem = 252 KiB, score = 10
    测试数据 #5: Accepted, time = 31 ms, mem = 256 KiB, score = 10
    测试数据 #6: Accepted, time = 31 ms, mem = 252 KiB, score = 10
    测试数据 #7: Accepted, time = 15 ms, mem = 252 KiB, score = 10
    测试数据 #8: Accepted, time = 31 ms, mem = 252 KiB, score = 10
    测试数据 #9: Accepted, time = 31 ms, mem = 252 KiB, score = 10
    Accepted, time = 169 ms, mem = 256 KiB, score = 100

  • @ 2015-01-23 22:08:30

    请问正解是不是不需要使用到数组呢

  • @ 2015-01-23 21:57:02

    抽样+冒泡排序一下就过了。。。

    蒟蒻我除了排序想不到其他的办法了(神牛勿喷),希望能学习下正解的算法。。。

    • @ 2015-01-24 03:44:31

      提示:分治。

  • @ 2015-01-21 19:05:37

    cpp可以做到开10W数组+stl的sort只用644KB....

    • @ 2015-01-21 19:17:46

      您卡的好准。

  • @ 2015-01-19 22:34:58

    我就不帮您重测了,现在的情况是,任何排序都不可能AC了,我把内存限制到了700KiB了。

    • @ 2015-01-21 18:55:13

      嘛,思路是别人的,代码是自己写的- -

      var
      n,c,v,now,i:longint;
      begin
      readln(n);
      read(c);
      v:=0;
      for i:=1 to n do
      begin
      read(now);
      if c=now then inc(v)
      else begin
      dec(v);
      if v<0 then begin v:=0;c:=now;end;
      end;
      end;
      writeln(c);
      end.
      测试数据 #0: Accepted, time = 0 ms, mem = 744 KiB, score = 10
      测试数据 #1: Accepted, time = 0 ms, mem = 744 KiB, score = 10
      测试数据 #2: Accepted, time = 0 ms, mem = 744 KiB, score = 10
      测试数据 #3: Accepted, time = 0 ms, mem = 740 KiB, score = 10
      测试数据 #4: Accepted, time = 31 ms, mem = 744 KiB, score = 10
      测试数据 #5: Accepted, time = 31 ms, mem = 744 KiB, score = 10
      测试数据 #6: MemoryLimitExceeded, time = 31 ms, mem = 744 KiB, score = 0
      测试数据 #7: MemoryLimitExceeded, time = 31 ms, mem = 744 KiB, score = 0
      测试数据 #8: MemoryLimitExceeded, time = 31 ms, mem = 744 KiB, score = 0
      测试数据 #9: MemoryLimitExceeded, time = 31 ms, mem = 744 KiB, score = 0
      这都能MLE,700KiB完全不够啊。。

    • @ 2015-01-21 19:04:58

      题解里有个用C++的人说排序还是能过,内存640KiB- -
      几乎相同的代码,C++的内存只有440KiB左右- -
      看来差距还是很大的,不如根据语言确定内存限制?

    • @ 2015-01-24 04:04:44

      我。。。在修改数据规模与限制。。。等你看到这句话的时候,应该已经修改好了,然后你可以尝试resubmit,不过请注意一下新的数据规模=_=

  • @ 2015-01-19 09:39:26

    之前还没有做好卡内存的功能呢,现在做好了,你可以用你以前的代码再试试?

  • @ 2015-01-18 14:08:17

    本来就要堆排序,我快排一递归就超,说明不能递归,时间复杂度跟快排一样的只有堆,而且堆不用递归,答案肯定是堆排序,只是我没空去写了- -。

    我实在是懒得写,就把数组开成70000,碰碰运气,呵呵,直接过了,水数据!我还以为有那种前面50000都是没用的数后面50000是答案的数据呢

    • @ 2015-01-18 21:03:35

      本来并不是希望你们用排序的 。

  • 1

信息

ID
1917
难度
6
分类
其他 | 二分查找 点击显示
标签
(无)
递交数
668
已通过
184
通过率
28%
被复制
3
上传者