hihoCoder太阁最新面经算法竞赛11 register

Ended

Participants:176

Verdict:Accepted
Score:100 / 100
Submitted:2016-10-17 10:37:52

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
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
using namespace std;
const int INTMAX = 0x7fffffff;
const int NMAX = 10001;
int N;
int num[200];
int l, r;
int minheap(int l, int r) {
    if (l > r) return 1;
    if (l == r) {
        cout << num[l] << ' ';
        return 1;
    }
    int m = l;
    int min = num[l];
    for (int i = l; i <= r; ++i) {
        if (num[i] < min) {
            m = i;
            min = num[i];
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX