随笔分类 - 日常刷题
摘要:数论 GCD 点击查看 B4025 最大公约数 gcd: 点击查看代码 #include<bits/stdc++.h> #define int long long using namespace std; int a,b; inline int read(){ int x=0,f=1; char c
阅读全文
摘要:P1505 [国家集训队] 旅游 思路: 边权转点权,由于父亲可能有许多儿子,所以一条边的权值需要付给儿子 点击查看代码 #include<bits/stdc++.h> #define ll long long using namespace std; const int N=2e6; inline
阅读全文