MAXPOSCQT

Xem PDF



Tác giả:
Dạng bài
Ngôn ngữ cho phép
C#, C++, Clang, Clang++, Cobol, D, Groovy, Haskell, Java, JS, Kotlin, Lua, Node JS, ObjectiveC, OCaml, Output, PHP, Prolog, Pypy, Pypy 3, Ruby, Rust, Scala, Swift
Điểm: 100 Thời gian: 1.0s Bộ nhớ: 256M Input: bàn phím Output: màn hình

Nhập vào mảng gồm n số nguyên. Tìm các thứ tự (vị trí) của số lớn nhất trong mảng.

Input

  • Dòng đầu tiên là số nguyên \(n (n \le 10^6)\). Dòng thứ 2 là mảng n số nguyên, các số
    cách nhau bởi dấu cách, trị tuyệt đối của các số không quá 10^18

Output

  • Gồm 1 số là vị trí max đầu tiên.

Example

Test 1

Input
4
1 4 2 -1
Output
2   

Bình luận


  • -2
    njsjfhdaoijdafifrjsirj    7:43 p.m. 6 Tháng 10, 2024

    🙂


    • -2
      njsjfhdaoijdafifrjsirj    7:42 p.m. 6 Tháng 10, 2024

      :(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(:(


      • -2
        njsjfhdaoijdafifrjsirj    7:41 p.m. 6 Tháng 10, 2024

        ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc


        • 3
          chienthancontent    7:53 p.m. 7 Tháng 4, 2023

          Test gì mà n = 5 nhưng ở dưới chỉ có 4 số thế