What are the rules regarding the reuse of personally-authored code in contests?

For example, suppose I have a BigInteger class in C++ which I have written myself.
Am I allowed to use this code during contests, or must all contest code be written within the duration of the contest?

Also, the code of conduct mentions giving attribution to any 3rd party code.
Are contestants also required to indicate the reuse of personally-authored code?