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

Ended

Participants:899

Verdict:Accepted
Score:100 / 100
Submitted:2016-08-07 12:53:10

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<cstring>
#include<cmath>
#include<algorithm>
#include<cstdio>
#include<queue>
#include<map>
using namespace std;
long long mod=1000000007;
int  b[501][501];
struct node{
    int a, d, g;
    bool operator < (const node& A) const{
        return g>A.g;
    }
};
node h;
int main()
{
    int n, m, i, j, k, l, x[501], y[501], c[501][501], q, e[3], f[3];
    cin >> n >> m;
    for(i = 1; i < n; i++)
        cin >> y[i];
    for(i = 1; i < m; i++)
        cin >> x[i];
        cin >> q;
    for(i = 1; i <= q; i++)
    {
        cin >> k >> l;
        b[k][l] = 1;
    }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX