| 比赛 |
2026.4.4 |
评测结果 |
AAAAA |
| 题目名称 |
For the Champion |
最终得分 |
100 |
| 用户昵称 |
终焉折枝 |
运行时间 |
0.016 s |
| 代码语言 |
C++ |
内存使用 |
3.63 MiB |
| 提交时间 |
2026-04-04 09:54:09 |
显示代码纯文本
#include "robot.h"
#include<bits/stdc++.h>
#define ll long long
const ll DIS = 1000000000;
void init(int c, int t){
return;
}
std::pair<int, int> robot(int n, std::vector<int> x, std::vector<int> y){
ll maxu = 1e18, maxd = 1e18;
for(int i = 0;i < n;i ++){
maxu = std::min(maxu, 1LL * (x[i] + y[i]));
maxd = std::min(maxd, 1LL * (x[i] - y[i]));
}
ll u, d;
u = move(2, DIS); u = move(2, DIS);
u = move(3, DIS); u = move(3, DIS);
d = move(1, DIS); d = move(1, DIS);
d = move(1, DIS); d = move(1, DIS);
ll sum = - (u - 4 * DIS - maxu); ll dif = - (d - 4 * DIS - maxd);
ll X = (sum + dif) / 2; ll Y = (sum - dif) / 2;
return std::make_pair(X, Y);
}