- CoVH之资料页数
- 2014-12-20 17:14:10 @
只过了9个点……同一页有多个脚注应该没有问题,请大神看看是什么情况?
编译成功
测试数据 #0: Accepted, time = 0 ms, mem = 816 KiB, score = 10
测试数据 #1: Accepted, time = 0 ms, mem = 816 KiB, score = 10
测试数据 #2: Accepted, time = 0 ms, mem = 816 KiB, score = 10
测试数据 #3: Accepted, time = 0 ms, mem = 816 KiB, score = 10
测试数据 #4: Accepted, time = 0 ms, mem = 816 KiB, score = 10
测试数据 #5: Accepted, time = 0 ms, mem = 816 KiB, score = 10
测试数据 #6: Accepted, time = 0 ms, mem = 816 KiB, score = 10
测试数据 #7: WrongAnswer, time = 0 ms, mem = 812 KiB, score = 0
测试数据 #8: Accepted, time = 0 ms, mem = 816 KiB, score = 10
测试数据 #9: Accepted, time = 0 ms, mem = 820 KiB, score = 10
WrongAnswer, time = 0 ms, mem = 820 KiB, score = 90
###Block Code
var
a:array[1..1000] of longint;
n,k,f,i,pg,ft,more,x,num:longint;
begin
readln(n,k);
readln(f);
pg:=0; ft:=0;
for i:= 1 to f do
begin
readln(x,num);
inc(pg,(x-ft-1) div k);
more:=(x-ft-1) mod k;
if more+num+1>k then begin
inc(pg);
ft:=x-num-1;
end
else ft:=x-more-num-1;
end;
inc(pg,(n-ft) div k);
more:=(n-ft) mod k;
if more>0 then inc(pg);
writeln(pg);
end.
2 条评论
-
琉璃盏 LV 10 @ 2014-12-21 14:11:34
呵呵呵呵呵呵呵呵呵
-
2014-12-21 00:27:28@
查他数据
- 1