比赛 |
Asm_Def战记之透明计算网络 |
评测结果 |
TTTTTTTTTT |
题目名称 |
Asm_Def排兵布阵 |
最终得分 |
0 |
用户昵称 |
pppoooiiizzy |
运行时间 |
10.000 s |
代码语言 |
C++ |
内存使用 |
4.13 MiB |
提交时间 |
2015-11-01 10:31:20 |
显示代码纯文本
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
const int maxn = 500000 + 5;
using namespace std;
inline int read()
{
int x = 0, f = 1;
char ch = getchar();
while( ch < '0' || ch > '9') {if( ch == '-') f = -1; ch = getchar(); }
while( ch >= '0' && ch <= '9') { x = x * 10 + ch - '0'; ch = getchar(); }
return x * f;
}
#define rep(i, j, k) for(int i = j; i <= k; i++)
#define drep(i, j, k) for(int i = j; i >= k; i--)
#define INF 0x3fffffff
struct poi {
int x, y;
}a[maxn];
int m, n, q, Ar, Sa, mx, my;
int temp;
int main()
{
freopen("asm_command.in", "r", stdin);
freopen("asm_command.out", "w", stdout);
n = read(); q = read();
rep(i, 1, n) a[i].x = 0, a[i].y = i;
rep(i, 1, q) {
temp = read();
if( temp == 1) {
Ar = read(), Sa = read(), mx = read(), my = read();
for(int j = Ar; j <= Sa; j++) {
a[j].x += mx;
a[j].y += my;
}
}
if( temp == 0) {
Ar = read();
printf("%0.1f %0.1f\n", (double)a[Ar].x, (double)a[Ar].y);
}
if( temp == 2) {
printf("6666666\n");
}
}
return 0;
}