随笔分类 - 小杂
记录本菜鸡在初期AC的憨憨题目
摘要:1 #include<bits/stdc++.h> 2 #define ll long long 3 using namespace std; 4 5 const int N = 2e5 + 10; 6 ll a[N]; 7 8 int main(){ 9 ios_base::sync_with_s
阅读全文
摘要:1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<string> 5 #include<cstdio> 6 7 using namespace std; 8 9 int n; 10 int a[1010
阅读全文
摘要:gcd(fib[i],fib[j]) = fib[gcd(i,j)];太6了 1 #include<iostream> 2 #include<algorithm> 3 #include<cstring> 4 #include<string> 5 #include<cmath> 6 #include<
阅读全文
摘要:这两天本来应该刷刷杭电的题,周末想着放松一下,就研究了一波入门哈希和tarjan。 洛谷上找了这题,tarjan套个模板写得很快,这个再次建图加DP花了好多时间才看懂...... 杭电的题来不及刷啦嘿嘿嘿 罗总在线催补题doge 说实话这题一上来思路比较清楚,然而tarjan之后还是照搬了不少题解区
阅读全文
摘要:题目链接:https://www.luogu.com.cn/problem/P3373 本题思路主要也是借鉴了洛谷题解区的方法 通过建立两个标签,tag1用于加法记忆,tag2用于乘法记忆 关键是注意两个运算标签的处理 当个简单模板康康 1 #include<bits/stdc++.h> 2 #de
阅读全文
摘要:http://acm.hdu.edu.cn/showproblem.php?pid=1257 #include<iostream>#include<math.h>#include<algorithm>#include<string>#include<string.h>using namespace
阅读全文
摘要:#include<iostream>#include<algorithm>#include<string.h>#include<vector>#include<cmath>using namespace std;const int maxn=1e5+10;vector<int>v[maxn];int
阅读全文
摘要:#include<iostream>#include<algorithm>#include<string.h>#include<queue> #include<cmath>using namespace std;int data[20][20];int route[20];bool vis[20];
阅读全文

浙公网安备 33010602011771号