Блог пользователя sweetsyrup.int99

Автор sweetsyrup.int99, история, 4 года назад, По-английски

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

my submission : https://codeforces.com/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

  • Проголосовать: нравится
  • +7
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится -9 Проголосовать: не нравится

Change your template. You can use my template

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +8 Проголосовать: не нравится

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.com/contest/702/submission/93105403