Editorial for SAC '22 Code Challenge 4 Junior P2 - Obligatory Geometry Problem
                Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
                Submitting an official solution before solving the problem yourself is a bannable offence.
Author:
Subtask 1
It suffices to maintain a string that stores the type of the current shape:
If it is a
setquery, update the string to that shape.If it is a
getquery, output1if the string and query shape are the same and output0, otherwise.
Time Complexity: 
Subtask 2
Extend the subtask  solution by giving each of the 
 shapes a string by defining an array.
Further, maintain the string for each of the  shapes:
If it is a
setquery, update the string at indexto that shape.
If it is a
getquery, output1if the string at indexand query shape are the same and output
0, otherwise.
Time Complexity: 
Comments