hiho week 210 register

Ended

Participants:154

Verdict:Accepted
Score:100 / 100
Submitted:2018-07-08 15:00:24

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 <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
const int maxn = 1e5+5;
long long A[maxn];
long long P[maxn];
long long S[maxn];
vector<pair<long long,int> >B;
bool cmp(pair<long long,int> x, pair<long long,int> y)
{
    return x.first > y.first;
}
int main()
{
    int n,m;
    cin >> n >> m;
    for (int i = 0; i < m; ++i)
        cin >> A[i];
    for (int i = 0; i < m; ++i)
        cin >> P[i];
    int cnt = 0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX