BEE MAJA cp2
BEE MAJA cp2
BEE MAJA cp2
#include <iostream>
#include <algorithm>
// 0,0 -> 1
// + 1
// 0,1 -> 2
// + 7
// 0,2 -> 9
// + 13
// 0,3 -> 22
// + 19
// 0,4 -> 41
int numNodesBy0X[10000];
int main()
int yMax = 1;
numNodesBy0X[yMax] = sum;
int num;
--position;
int xCircleVal = 0;
if (change == 5)
distanceLeft -= move;
cout << xCircleVal << ' ' << yCircleVal << '\n';
}
MONOCYCLE
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define PI 3.1415926535897932385
#define pb push_back
#define maxN 30
class Node {
public:
x = xx; y = yy;
dr = d; cl = c;
};
const int dx[] = { -1, 0, 1, 0 };
int n, m, d[maxN][maxN][4][5];
char s[maxN][maxN];
queue<Node> Q;
Q.push(Node(x, y, 0, 0));
d[x][y][0][0] = 0;
while (!Q.empty()) {
x = u.x + dx[u.dr];
y = u.y + dy[u.dr];
int cl = (u.cl + 1) % 5;
d[x][y][u.dr][cl] = val + 1;
REP(i, 2) {
if (d[u.x][u.y][dr][u.cl]==INF) {
d[u.x][u.y][dr][u.cl] = val + 1;
return -1;
}
main() {
// FileIn("test"); FileOut("test");
int x, y, Case = 0;
REP(i, n) {
gets(s[i]);
REP(j, m) {
if (s[i][j]=='S')
x = i, y = j;
REP(k, 4)
REP(t, 5)
d[i][j][k][t] = INF;
if (Case) printf("\n");
Case #1
Case #2
h = 0.8660254037844386
h_3 = h/3
h_23 = 2*h/3
def find_center_coord(index):
root = int(sqrt(index))
y = -root*h
if index % 2 == root % 2:
# .
# /\
# -----
y -= h_23
else:
# -----
# \/
# .
y -= h_3
x = (0.5) * (disp-root)
return x, y
while True:
line = stdin.readline().strip()
if line == "":
break
line = line.split()
s, t = int(line[0]), int(line[1])
x1, y1 = find_center_coord(s)
x2, y2 = find_center_coord(t)
stdout.write("{:.3f}\n".format(distance))