0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-24 17:32:00 +00:00

D - Robot Arms

https://atcoder.jp/contests/arc103/submissions/36946825
This commit is contained in:
Baoshuo Ren 2022-12-03 19:39:51 +08:00
parent 67a87b43cb
commit 8f66b7d8bb
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
109 changed files with 400 additions and 0 deletions

76
AtCoder/ARC103/D/D.cpp Normal file
View File

@ -0,0 +1,76 @@
#include <iostream>
#include <cmath>
using std::cin;
using std::cout;
const char endl = '\n';
const int N = 1005;
int n, m, x[N], y[N], z[50];
bool flag;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> x[i] >> y[i];
if (i > 1 && flag != std::abs(x[i] + y[i]) % 2) {
cout << -1 << endl;
exit(0);
}
flag |= std::abs(x[i] + y[i]) % 2;
}
m = flag ? 31 : 32;
cout << m << endl;
if (flag) {
for (int i = 30; i; i--) {
cout << (z[30 - i + 1] = 1 << i) << ' ';
}
} else {
for (int i = 30; ~i; i--) {
cout << (z[30 - i + 1] = 1 << i) << ' ';
}
}
cout << (z[m] = 1) << endl;
for (int i = 1; i <= n; i++) {
for (int j = 1; j <= m; j++) {
if (std::abs(x[i]) > std::abs(y[i])) {
if (x[i] > 0) {
cout << 'R';
x[i] -= z[j];
} else {
cout << 'L';
x[i] += z[j];
}
} else {
if (y[i] > 0) {
cout << 'U';
y[i] -= z[j];
} else {
cout << 'D';
y[i] += z[j];
}
}
}
cout << endl;
}
return 0;
}

BIN
AtCoder/ARC103/D/data/1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/11.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/11.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/12.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/12.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/13.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/13.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/14.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/14.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/15.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/15.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/16.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/16.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/17.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/17.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/18.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/18.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/19.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/19.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/20.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/20.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/21.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/21.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/22.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/22.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/23.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/23.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/24.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/24.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/25.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/25.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/26.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/26.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/27.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/27.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/28.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/28.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/29.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/29.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/30.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/30.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/31.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/31.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/32.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/32.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/33.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/33.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/34.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/34.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/5.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/5.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/6.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/6.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/7.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/7.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/8.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/8.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/9.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/9.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sample1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sample1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sample2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sample2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sample3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sample3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sample4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sample4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub1.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub1.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub10.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub10.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub11.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub11.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub12.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub12.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub13.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub13.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub14.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub14.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub15.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub15.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub16.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub16.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub2.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub2.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub3.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub3.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub4.in (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub4.out (Stored with Git LFS) Normal file

Binary file not shown.

BIN
AtCoder/ARC103/D/data/sub5.in (Stored with Git LFS) Normal file

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More