Add solution for 2016 Day 1

This commit is contained in:
Thraix
2026-08-06 22:17:35 +02:00
parent 80eacc6ed2
commit c8f0000c4d
3 changed files with 65 additions and 9 deletions
+14
View File
@@ -9,6 +9,20 @@ struct Index2D
int x = -1;
int y = -1;
void RotateCW()
{
int tmp = y;
y = x;
x = -tmp;
}
void RotateCCW()
{
int tmp = y;
y = -x;
x = tmp;
}
bool IsValid()
{
return x != -1 && y != -1;