码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
P1194 买礼物【kruskal】
题目 https://www.luogu.com.cn/problem/P1194 思路 如果有优惠才建边,而且在kruskal判断的过程中,如果优惠的价钱比原价低才算 代码 #include<iostream> #include<cstdio> #include<string> #include< ...
分类:其他好文   时间:2020-06-26 20:39:04    阅读次数:56
C# write stream to local file
Write the current to the local file. static void CopyStream(Stream stream, string destPath) { using (var fileStream = new FileStream(destPath, FileMod ...
分类:Windows程序   时间:2020-06-26 20:24:45    阅读次数:69
P1396 营救【DFS+二分 kruskal】
题目 https://www.luogu.com.cn/problem/P1396 分析 这道题与这道题很相似,只不过那道题需要使用dijkstra判断是否到达,而本题只需要使用DFS来判断 大概思路就是这种最大值中的最小的问题: 先找到题目中用到的拥挤度的最大值以及最小值,然后在这个范围内进行二分 ...
分类:其他好文   时间:2020-06-26 20:20:24    阅读次数:62
真-MVC控制器AJAS
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc; namespace WeekMvc.Controllers{ public class Goo ...
分类:Web程序   时间:2020-06-26 20:02:21    阅读次数:61
P2121 拆地毯【kruskal】
题目 https://www.luogu.com.cn/problem/P2121 分析 组织者被要求只能保留 K 条地毯,且保留的地毯构成的图中,任意可互相到达的两点间只能有一种方式互相到达: 要构成只有K条边的最大生成树——使用kruskal 代码 #include<iostream> #inc ...
分类:其他好文   时间:2020-06-26 19:55:48    阅读次数:60
C# NPOI read excel files include xls and xlsx
1.Install-package npoi; 2.Add necessary namespace as below. using System.IO;using System.IO.Compression;using NPOI.HSSF.UserModel;using NPOI.SS.UserMo ...
分类:Windows程序   时间:2020-06-26 19:54:10    阅读次数:76
uva 11292
不墨迹 #include <iostream> #include <algorithm> using namespace std; const int maxn = 1e6; int a[maxn], b[maxn]; int main() { #ifndef ONLINE_JUDGE freope ...
分类:其他好文   时间:2020-06-26 18:16:06    阅读次数:64
顺序栈的实现-1
1 #define Max 50 2 #define ElemType int 3 #define OK 1 4 using namespace std; 5 6 typedef struct Stack //顺序栈的定义 7 { 8 int data[Max]; 9 int top; 10 }St ...
分类:其他好文   时间:2020-06-26 18:02:19    阅读次数:49
结构体lower_bound使用
裸题:https://ac.nowcoder.com/acm/contest/5929/B #include<bits/stdc++.h> using namespace std; typedef long long ll; const int inf = 0x3f3f3f3f; int n; st ...
分类:其他好文   时间:2020-06-26 16:23:42    阅读次数:104
Object转Json 源码
1 using System; 2 using System.Collections; 3 using System.Reflection; 4 using System.Text; 5 6 namespace JSON 7 { 8 /// <summary> 9 /// 模型转为JSON 10 / ...
分类:Web程序   时间:2020-06-26 16:15:18    阅读次数:73
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!