这个题告诉我们:输入优化很重要

未优化:测试数据 #0: Accepted, time = 0 ms, mem = 1156 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 1152 KiB, score = 10
测试数据 #2: Accepted, time = 15 ms, mem = 1160 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 1156 KiB, score = 10
测试数据 #4: Accepted, time = 31 ms, mem = 1156 KiB, score = 10
测试数据 #5: Accepted, time = 265 ms, mem = 1156 KiB, score = 10
测试数据 #6: Accepted, time = 406 ms, mem = 1156 KiB, score = 10
测试数据 #7: Accepted, time = 453 ms, mem = 1156 KiB, score = 10
测试数据 #8: TimeLimitExceeded, time = 1015 ms, mem = 1160 KiB, score = 0
测试数据 #9: TimeLimitExceeded, time = 1015 ms, mem = 1156 KiB, score = 0

优化后:
测试数据 #0: Accepted, time = 0 ms, mem = 4644 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 4644 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 4644 KiB, score = 10
测试数据 #3: Accepted, time = 15 ms, mem = 4648 KiB, score = 10
测试数据 #4: Accepted, time = 15 ms, mem = 4644 KiB, score = 10
测试数据 #5: Accepted, time = 31 ms, mem = 4648 KiB, score = 10
测试数据 #6: Accepted, time = 31 ms, mem = 4648 KiB, score = 10
测试数据 #7: Accepted, time = 46 ms, mem = 4648 KiB, score = 10
测试数据 #8: Accepted, time = 125 ms, mem = 4648 KiB, score = 10
测试数据 #9: Accepted, time = 171 ms, mem = 4648 KiB, score = 10

4 条评论

  • 1

信息

ID
1090
难度
5
分类
其他 | 数学 点击显示
标签
(无)
递交数
3966
已通过
1260
通过率
32%
被复制
20
上传者