In function.h we define a class called Block. If a Block is rotation invariant, it is always displayed in the same form no matter how many times it is rotated. For example,
@OOX
OOXX
XXXX
XXXX
is not rotation invariant, but
@OO@
OOOO
OOOO
@OO@
is rotation invariant.
Your task is to complete the implementation of clockwise90(), which rotates the pattern by 90 degrees clockwise, first. Then invariant() to check if the input Block is rotation invariant or not.
The following is the format of invariant() and clockwise(), respectively.
friend bool invariant(const Block& a);
void clockwise90();
You need to implement these functions in function.cpp (main.cpp and function.h are provided in10635).
NOTICE: If you get Judge Error, you may change the compile setting to c++11 while submitting your code.
The input will be given in main.cpp
The output will be generated by main.cpp