码迷,mamicode.com
首页 >  
搜索关键字:ans    ( 3741个结果
2020.1.29 寒假训练赛2
https://vjudge.net/contest/354199#overview A: 简单模拟。 #include<bits/stdc++.h> using namespace std; int n,ans; bool vis[29]; string S; map<string,bool>ma ...
分类:其他好文   时间:2020-01-30 12:50:54    阅读次数:56
codechef Chef at the River
难度 $hard$ 题意 "官方中文题意" 做法 设$G=(V,E)$ 定义1 :$M(G)$为$G$的最小点覆盖 定义2 :$ans(G)$为$G$的题意答案,不考虑船夫 结论1 :$M(G)\le ans(G)$ 第一次最少也得带走$M(G)$个 结论2 :$ans(G)\le M(G)+1$ ...
分类:其他好文   时间:2020-01-30 10:04:28    阅读次数:75
leetcode新年病房暴乱康复计划 15. 三数之和 JS解法
var threeSum = function(nums) { var ans = []; var nums = nums.sort(function(a,b){return a - b}); var flag = 0; while(flag < nums.length - 2){ if (nums ...
分类:Web程序   时间:2020-01-29 23:12:07    阅读次数:92
P3386 【模板】二分图匹配
#include <bits/stdc++.h> using namespace std; const int maxn = 1010; int n,m,e; int vis[maxn][maxn]; int ask[maxn]; int cnt, ans; int matched[maxn]; b ...
分类:其他好文   时间:2020-01-29 18:19:17    阅读次数:72
还是畅通工程 HDU - 1233
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N=110; int p[N],n,m,ans,num; struct node { in ...
分类:其他好文   时间:2020-01-29 16:25:13    阅读次数:95
[题解] Luogu P5641 【CSGRound2】开拓者的卓识
这个柿子挺别致的......~~还有信仰膜数998244353~~ 直接讲正解吧...... 首先发现这个柿子从上往下算好像不怎么行,我们从下往上看,(下面令$Ans_r = sum_{k,1,r}$)。 考虑$a_i$对$Ans_r$的贡献($1 \le i \le r$),即$a_i$在$sum ...
分类:其他好文   时间:2020-01-29 14:12:36    阅读次数:63
Common Subsequence POJ - 1458 最长公共子序列 线性DP
#include <iostream> #include <algorithm> #include <string> #include <cstring> #include <cstdio> #define MAX 1005 using namespace std; int ans[MAX][MAX ...
分类:其他好文   时间:2020-01-28 19:21:43    阅读次数:85
PAT (Advanced Level) 1044 Shopping in Mars
题解 利用前缀和维护钻石的价值,然后枚举左端点,二分查找右端点。 代码 #include<bits/stdc++.h> using namespace std; int n,m,pre_sum[100005]; vector<int> ans; void check(int i,int &j,int ...
分类:其他好文   时间:2020-01-28 15:33:52    阅读次数:65
模拟赛题目选集
"A. 【线上训练13】二叉树" 题解:贪心,先求出这两个序列,i在第一个序列位置为$a[i]$,第二个为$b[i]$,如果$a[i] b[i]$, $ans += 2^{a[i] b[i]}$ cpp include include include include include include ...
分类:其他好文   时间:2020-01-28 09:34:02    阅读次数:62
Python 使用Scapy模块编写一个简单的扫描端口是否过滤
代码 1 from scapy.all import IP,TCP,sr 2 ans,unans=sr(IP(dst="192.168.1.128")/TCP(dport=[21,23,135,443,445],flags="A"),timeout=3) 3 for s,r in ans: 4 if ...
分类:编程语言   时间:2020-01-27 17:38:06    阅读次数:147
3741条   上一页 1 ... 26 27 28 29 30 ... 375 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!