Add solution for 2016 Day 1

This commit is contained in:
Thraix committed 2026-08-06 22:17:35 +02:00
1 parent 80eacc6ed2
commit c8f0000c4d
3 files changed
+65 -9

No files matched your search

+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;