oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

minimum Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

minimum.html

Problem Description

Given an array of length N, find the minimum value within the array A.

This is a function call problem. There will be no input and output. You are supposed to implement the following functions:

  1. int findMin(int N, int A[]), which returns the minimum value within array A of length N.

Input

Your function will be called with two parameters, N, the number of elements in the array, and A[], the array itself.

Output

Your function should return an integer, the minimum number found in array A[]

Limits

0 <= A[i] <= 2 000 000 000

Subtask 1 (15%): 1 <= N <= 1 000
Subtask 2 (35%): 1 <= N <= 1 000 000
Subtask 3 (50%): 1 <= N <= 10 000 000

Sample Input 1

findMin(2, [3, 5]);

Sample Output 1

The function will return 3.

Sample Input 2

findMin(5, [1, 5, 2, 3, 10]);

Sample Output 2

The function will return 1.

Tags

Syntax, Function Call

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
115501s64MBMinimum
235501s64MBMinimum
350501s64MBMinimum

Attachments

Attachment Filesize Last Updated
minimum.h51B23 Jul 2013, 07:05:10
grader.cpp216B23 Jul 2013, 07:04:46
ans.cpp89B23 Jul 2013, 07:08:55

Judge Compile Command

g++-8 ans.cpp grader.cpp -o minimum -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.