[Offer收割]编程练习赛1 register

Ended

Participants:955

Verdict:Accepted
Score:100 / 100
Submitted:2016-03-06 16:29:01

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
//  main.cpp
//  OJTest
//
//  Created by  on 16/3/6.
//  Copyright © 2016 joker. All rights reserved.
//
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
int MaxOfArray(int* array, int size) {
    int ans = -1;
    
    for (int i = 0;i < size; i ++) {
        ans = ans > array[i] ? ans : array[i];
    }
    
    return ans;
}
int main(int argc, const char * argv[]) {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX