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

Ended

Participants:154

Verdict:Wrong Answer
Score:30 / 100
Submitted:2018-04-08 14:25:30

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 <stdio.h>
#include <cmath>
#include <math.h>
#include <algorithm>
#include <string.h>
#include <set>
#include <map>
#include <queue>
using namespace std;
typedef pair<int,int> pa;
typedef long long ll;
const int inf=(1<<30);
const int maxn=100005;
struct node{
    ll wi;
    int parent;
    vector<int> child;
    set<ll> power;
    int powernum;
}a[maxn];
set<ll>::iterator s1;
set<ll>::iterator s2;
int du[maxn];
void fun(int t){
    int tparent=a[t].parent;
    for(s1=a[t].power.begin();s1!=a[t].power.end();s1++){
        for(s2=a[tparent].power.begin();s2!=a[tparent].power.end();s2++){
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX