Flack_504's blog

By Flack_504, 2 weeks ago, In English

Hi everyone,

I have a question about the Rule Restricting the Use of AI and want to make sure I follow it correctly before joining another rated rounds.

The rule says: “Using AI to generate simple boilerplate code (e.g., input/output functions) is allowed.” I’m currently testing a C++ template that was assisted by AI, and I’d like to confirm it counts as simple boilerplate.

What the template contains:

  • (#include <bits/stdc++.h>, using namespace std;)
  • Type aliases (ll, pii, vi, ...) and short macros (pb, all, sz, rep, per)
  • MOD and INF constants
  • A dbg(...) macro that prints variables to cerr and is compiled only under -DLOCAL, so it does nothing on submission
  • Small helpers: YES(), NO(), yesno(bool), read(vector)
  • Fast I/O and a solve() loop over test cases in main()

What it does not contain: any algorithm or problem-specific logic (no modular exponentiation, sieve, DSU, etc.). solve() is empty.

Disclosure: The template was written with the help of an AI assistant. An earlier version also contained power() and inv() (modular exponentiation and inverse), and I used that version in a submission practice.

Submission: https://codeforces.me/contest/1335/submission/398511114

My questions:

  1. Is an AI-assisted template like this fine to use, since it is only boilerplate?
  2. Is the dbg macro fine, or does a debug helper go beyond “simple boilerplate”?
  3. Where is the line for pre-written snippets? For example, is a power() or inv() helper counted as “algorithmic logic,” even if I wrote it myself?

Thanks for any guidance, and I’m happy to remove anything that is considered too much.

Full text and comments »

  • Vote: I like it
  • +2
  • Vote: I do not like it