码迷,mamicode.com
首页 >  
搜索关键字:xunsearch namespace    ( 41960个结果
1481F.AB Tree(树上信息统计+01背包+记录DP路径+Bitset优化时间复杂度)
#include<bits/stdc++.h> using namespace std; const int maxn=1e5+100; const int inf=1e9; int n,m,x; int dep[maxn];//节点在第几层 int num[maxn];//每一层的节点个数 int ...
分类:其他好文   时间:2021-02-15 11:49:10    阅读次数:0
《 Codeforces Round #699 (Div. 2)》
A:把多余的步数删掉即可。 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> pii; const int N = 1e4 + 5; const int M = 1e4 + ...
分类:其他好文   时间:2021-02-09 12:16:59    阅读次数:0
数独检查
数独是一种流行的单人游戏。 目标是用数字填充9x9矩阵,使每列,每行和所有9个非重叠的3x3子矩阵包含从1到9的所有数字。 每个9x9矩阵在游戏开始时都会有部分数字已经给出,通常有一个独特的解决方案。 给定完成的N2?N2数独矩阵,你的任务是确定它是否是有效的解决方案。 有效的解决方案必须满足以下条 ...
分类:其他好文   时间:2021-02-09 12:16:43    阅读次数:0
AcWing 1214. 波动数列
原题链接 考察:背包dp 错误思路: f[i,j] j表示和 此思路必错,会MLE. 正确思路: 需要转换式子.已知 x + x+d1 + x+d1 +d2+x+d1+d2+d3...=s 等价于 nx+(n-1)d1+(n-2)d2+.. = s. s与n已知,d在a与b徘徊,而x的范围太广,因此 ...
分类:Windows程序   时间:2021-02-09 12:03:16    阅读次数:0
2021.01.30 Rating赛 解题/补题报告
A 一共n个人,去a餐厅的有a人,去b餐厅有b人,两个都去的有c人,求没有去的有多少,如果数据不合理或没去的人数少于1,输出-1 #include<bits/stdc++.h> using namespace std; #define ll long long int main() { int n, ...
分类:其他好文   时间:2021-02-09 11:44:03    阅读次数:0
Saruman's Army
#include<cstdio> #include<iostream> #include<set> #include<algorithm> using namespace std; set<int> s; int main(void) { int R, n; while (cin >> R >> n ...
分类:其他好文   时间:2021-02-08 12:52:08    阅读次数:0
CF1148C Crazy Diamond
题目链接 题意分析 我们考虑从1到n不断进行维护 同时令mid=n/2 接下来我们讨论如何交换x,y这两个位置上的数 1.1≤x≤mid,mid<y≤n 1 x mid y n 使用两次交换 1-y x-n y n mid 1 x 使用一次交换 x-y x n mid 1 y 使用两次交换 1-x ...
分类:其他好文   时间:2021-02-08 12:30:37    阅读次数:0
[WPF 学习] 18. 摄像头(肢解DirectShow)
公司的产品需要人脸比对,摄像头相关的需求如下(突然发现除了英文不太好外,实际上中文也不太好,所以直接上一个接口) using System; using System.Drawing; using System.Windows.Media; namespace YK { public enum EC ...
分类:Windows程序   时间:2021-02-08 12:29:07    阅读次数:0
[CF1385E] Directing Edges - 拓扑排序
给定一个由有向边与无向边组成的图,现在需要你把所有的无向边变成有向边,使得形成的图中没有环,如果可以做到请输出该图,否则直接输出 NO ...
分类:编程语言   时间:2021-02-08 12:16:27    阅读次数:0
2.5 上海马拉松 C题题解
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; ll a, b, c, d; void solve1() { if (a > 0) { puts("(-inf,inf)"); ...
分类:其他好文   时间:2021-02-08 12:05:36    阅读次数:0
41960条   上一页 1 ... 34 35 36 37 38 ... 4196 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!