比赛 |
Asm.Def战记之圣地亚哥“杯2015 |
评测结果 |
AAAAAAAWWW |
题目名称 |
Asm.Def的命令 |
最终得分 |
70 |
用户昵称 |
typhon |
运行时间 |
13.764 s |
代码语言 |
Pascal |
内存使用 |
1.69 MiB |
提交时间 |
2015-10-31 11:40:22 |
显示代码纯文本
type peo=record
x:double;
y:double;
end;
var pe:array[1..100000] of peo;
dx,dy,deg,a,b,i,j,p,q,n:longint;
begin
assign(input,'asm_command.in');
reset(input);
assign(output,'asm_command.out');
rewrite(output);
readln(n,q);
for i:=1 to n do
pe[i].x:=0;
for i:=1 to n do
pe[i].y:=i;
for i:=1 to q do
begin
read(p);
case p of
0:begin
readln(a);
writeln(pe[a].x:0:1,' ',pe[a].y:0:1);
end;
1:begin
readln(a,b,dx,dy);
for j:=a to b do
begin
pe[j].x:=pe[j].x+dx;
pe[j].y:=pe[j].y+dy;
end;
{ 3: begin
readln(a,b,deg);
for j:=a to b do
begin
if deg=180 then begin
pe[j].x:=0-pe[j].x;
pe[j].y:=0-pe[j].y;
end;
end; }
{ 2:begin readln(a,b,deg);for j:=a to b do begin pe[j].x:=0-pe[j].x;pe[j].y:=0-pe[j].y;end;end; }
end;
{ if p=2 then begin readln(a,b,deg);for j:=a to b do begin pe[j].x:=0-pe[j].x;pe[j].y:=0-pe[j].y;end;end; }
end;
end;
close(input);
close(output);
end.