Submit solution

Points: 100 (partial)
Time limit: 1.0s
Memory limit: 1023M
Input: stdin
Output: stdout

Author:
Problem type

Cho một dãy gồm n số nguyên dương A_1, A_2,…, A_n. (N \le 10^5, A_i \le 10^9).

Hãy in số lớn nhất cùng chỉ số của nó, nếu có nhiều số lớn nhất thì in ra chỉ số của số đầu tiên gặp.

Input

  • Dòng đầu chứa số n, dòng thứ hai chứa n số nguyên dương A_1, A_2,…, A_n.

Output

  • Dòng đầu chứa số có giá trị lớn nhất, dòng thứ hai chỉ số của nó.

Example

Test 1

Input
6
91 451 43 3 451 54
Output
451
2

Comments


  • 1
    nguyentheanh2012 9:03 a.m. 10 sep, 2023

    tính chỉ số trong python là gì vậy mn


    • -4
      UserName 10:48 a.m. 24 may, 2023

      1 đấm AC, ez game


      • 0
        scratch_huykhanh 12:39 a.m. 13 apr, 2023

        gần như ai cx mất 1 đấm hết do test case lỗi =(


        • -5
          tk21phucnguyenxuan 3:12 p.m. 18 dec, 2022

          This comment is hidden due to too much negative feedback. Click here to view it.


          • -6
            tunganh1978 5:03 p.m. 12 oct, 2021

            This comment is hidden due to too much negative feedback. Click here to view it.


            • -1
              huyttyl2008 4:50 p.m. 12 oct, 2021

              hi ae


              • -9
                tunganh1978 4:43 p.m. 12 oct, 2021

                This comment is hidden due to too much negative feedback. Click here to view it.

                3 replies

                • -5
                  quangduong0907 3:41 p.m. 12 oct, 2021 edit 4

                  This comment is hidden due to too much negative feedback. Click here to view it.

                  3 replies

                  • -6
                    minhkhoidepzai 10:01 a.m. 17 jul, 2021

                    This comment is hidden due to too much negative feedback. Click here to view it.


                    • -8
                      rikikudo 9:29 p.m. 12 jul, 2021

                      This comment is hidden due to too much negative feedback. Click here to view it.

                      1 reply