1 CF959E 异或和 题目链接:https://codeforces.com/problemset/problem/959/e 2 题目描述 时间限制 \(2s\) | 空间限制 \(256M\) \(Ehab\) 对按位异或运算和特殊图运算感兴趣,\(Mahmoud\) 给了他一个融合了这个两 ...
分类:
其他好文 时间:
2021-02-19 12:54:40
阅读次数:
0
Problem Description Kolya loves putting gnomes at the circle table and giving them coins, and Tanya loves studying triplets of gnomes, sitting in the ...
分类:
其他好文 时间:
2021-02-18 13:33:21
阅读次数:
0
题目描述 For this problem, you will write a program that reads in a sequence of 32-bit signed integers. After each odd-indexed value is read, output the m ...
分类:
其他好文 时间:
2021-02-18 13:06:04
阅读次数:
0
题目 题目链接:https://www.ybtoj.com.cn/contest/114/problem/2 \(n\leq 100,m\leq 2000,a,b<P\leq 10^{18}\)。 思路 上来就是一堆条件要你求值直接劝退。。。 根据条件三,可以得到对于任意一个环 \(\sum B(v ...
分类:
其他好文 时间:
2021-02-18 13:00:29
阅读次数:
0
正题 题目链接:https://www.ybtoj.com.cn/problem/893 题目大意 给出一张$n$个点$m$条边的无向联通图,每条边正反向各有$A,B,C$三种边权。 保证满足 \(A_{x,y}=-A_{y,x}\ ,\ B_{x,y}=B_{y,x}\ ,\ C_{x,y}=-C ...
分类:
其他好文 时间:
2021-02-18 12:55:29
阅读次数:
0
https://www.acwing.com/problem/content/1143/ \(裸题\) #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); c ...
分类:
其他好文 时间:
2021-02-17 14:58:39
阅读次数:
0
https://www.acwing.com/problem/content/1144/ #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0); cout.tie ...
分类:
其他好文 时间:
2021-02-17 14:57:50
阅读次数:
0
https://www.acwing.com/problem/content/1145/ 思路 \(把已有的边加上,会形成各个连通块,等价于把每个连通块当成一个点去做Kruskal算法.\) #include <bits/stdc++.h> using namespace std; #define ...
分类:
其他好文 时间:
2021-02-17 14:56:41
阅读次数:
0
高斯消元解线性方程组 时间复杂度:O(\(n^3\)) https://www.luogu.com.cn/problem/P3389 题意:给定一个线性方程组,对其求解。 #include <bits/stdc++.h> using namespace std; const char nl = '\ ...
分类:
其他好文 时间:
2021-02-17 14:54:53
阅读次数:
0
原题链接 考察:状压dp 思路: 考虑到计算三角形,我们需要知道落脚点i和前一个落脚点j,所以需要三维数组.根据状态转移方程f[i][j][k] = f[i-{j}][k][t]+score很容易求出最大的权值.但是比较难想到怎么计算路径数目(对本蒟蒻而言).方法是再声明一个记录当前路径最大值的方案 ...
分类:
其他好文 时间:
2021-02-17 14:41:52
阅读次数:
0