sweetsyrup.int99's blog

By sweetsyrup.int99, history, 4 years ago, In English

here is the problem : https://codeforces.me/problemset/problem/702/A

my submission : https://codeforces.me/problemset/submission/702/93103318

I already use c++17,c++14,c++11 and it seems the problem is in my code, I don't know why

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

»
4 years ago, # |
  Vote: I like it -9 Vote: I do not like it

Change your template. You can use my template

»
4 years ago, # |
Rev. 2   Vote: I like it +8 Vote: I do not like it

Why are u defining arr[n] before even taking n as the input. Define long long int arr[n] after the line : cin >> n;

Here's ur modified code : https://codeforces.me/contest/702/submission/93105403