-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtele.cpp
More file actions
50 lines (40 loc) · 1.09 KB
/
Copy pathtele.cpp
File metadata and controls
50 lines (40 loc) · 1.09 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define db(x) cout << '>' << #x << ':' << x << endl;
#define all(v) v.begin(), v.end()
#define pii pair<int, int>
#define mxN 1e7
#define newl cout << "\n"
#define vi vector<int>
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define ll long long int
#define vll vector<ll>
typedef pair<int, pair<int, int>> threepair;
class Solution {
public:
int maximumScore(vector<int>& arr, vector<vector<int>>& edges) {
int n = arr.size();
vi cond(n, 1);
vector<vector<ll>> g(n);
for(auto& e : edges) {
g[e[0]].pb(e[1]);
g[e[1]].pb(e[0]);
}
ll res = cal(cond, g);
cout<<res<<"\n";
if(res >= 4) return cal(arr, g);
return -1;
}
};
int main() {
freopen("../output.txt", "w", stdout);
auto sol = Solution();
vi a = {1, 1, 1, 1};
vi b = {811,364,124,873,790,656,581,446,885,134};
vi arr = {4,1,5,2,6,2};
vi pf = {1, 2, 3, 6};
auto res = sol.kIncreasing(a, 3);
db(res);
// vector<int> v;
}