Mohamed.Bassem's blog

By Mohamed.Bassem, 12 years ago, In English

Hi All, I would like to know how to hack a code on Codeforces using a generator , could someone please show me a sample generator that he used before ? Thank You :)

UDPATE : You should print a new line at the end of the generated case , Thank You guys :)

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

| Write comment?
»
12 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

You just have to write a code which will print the test case to stdout,that's all

»
12 years ago, # |
Rev. 4   Vote: I like it 0 Vote: I do not like it

Example


int main(){ int n = 100; cout << n << '\n'; for(int i = 0; i < n; ++i) { if(i != 0) cout << ' '; cout << 1; } cout << endl;
»
7 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What is generator command line argument ?