码迷,mamicode.com
首页 >  
搜索关键字:xunsearch namespace    ( 41960个结果
字符串交替出现
using System; namespace leecode1 { class Program { static void Main(string[] args) { string outString= string.Empty; string s1 = "abc"; string s2 = "p ...
分类:其他好文   时间:2021-02-24 12:48:10    阅读次数:0
E. Cheap Dinner from Educational Codeforces Round 104 (Rated for Div. 2)
题意:有4种菜,每种菜有n1,n2,n3,n4个,每个菜有一个价格。 需要你每种菜选1个,问最小价格。但1和2、2和3、3和4之间有些菜有1对1的互斥关系,如果有互斥则不能选。 做法:把每两组贪心线性预处理,最后合并即可 #include<bits/stdc++.h> using namespace ...
分类:其他好文   时间:2021-02-23 14:09:14    阅读次数:0
边连通分量
冗余路径 \(\href{https://www.acwing.com/solution/content/20697/}{边连通分量}\) \(本题是等价于加入最少边是整个图变成边连通分量(没有桥)\) #include <bits/stdc++.h> using namespace std; #d ...
分类:其他好文   时间:2021-02-22 12:51:09    阅读次数:0
【WZOI 21/239】 Picks loves segment tree
题链 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <stdlib.h> #pragma GCC optimize(2 ...
分类:其他好文   时间:2021-02-22 12:36:23    阅读次数:0
ABC 192 题解
A 模拟 B 模拟 C 模拟 #include<bits/stdc++.h> using namespace std; #define SET0(a) memset(a,0,sizeof(a)) #define FOR(i,a,b) for(int i=(a);i<=(b);i++) #define ...
分类:其他好文   时间:2021-02-22 12:10:05    阅读次数:0
gym 102904 B Dispatch Money 题解
gym 102904 B Dispatch Money 决策单调+cdq分治。 时间复杂度为$O(N\log^3N)$ /* { ###################### # Author # # Gary # # 2021 # ###################### */ #includ ...
分类:其他好文   时间:2021-02-22 11:57:44    阅读次数:0
C# 算法系列 - 贪婪算法(覆盖问题)
using System; using System.Collections.Generic; using System.Linq; namespace ConsoleApp1 { class Program { static void Main(string[] args) { /* 贪心算法(集 ...
分类:编程语言   时间:2021-02-20 12:42:12    阅读次数:0
GYM102119A Tritwise Mex
题目大意 给你两个长度为 \(3^k\) 的数组。 定义两个数的 \(\text{mex}_3(a,b)\) 为两个数的在三进制下每一位的 \(\text{mex}\) 所组成的数。 求一个新的数组: \[ c_k=\sum_{\text{mex}_3(i,j)=k}a_i\cdot b_j \] ...
分类:其他好文   时间:2021-02-20 12:22:45    阅读次数:0
[Codeforces 1486C2]Guessing the Greatest (hard version)
文章中若有不严谨或错误的地方,欢迎在评论中指出QAQ Description 题目链接 这是一道交互题,题目给出长度为 \(n\) 的数组 \(a\) ,每次查询的格式为 "? \(l\) \(r\)",其中 \(l\) 和 \(r\) 为查询的区间左端点和右端点,注意 \(l \le r\)。你会 ...
分类:其他好文   时间:2021-02-20 12:08:17    阅读次数:0
餐巾计划问题(费用流)
题意 一个餐厅在相继的 \(N\) 天里,每天需用的餐巾数不尽相同。假设第 \(i\) 天需要 \(r_i\) 块餐巾 (\(i=1,2,\dots,N\))。 餐厅可以购买新的餐巾,每块餐巾的费用为 \(p\) 分;或者把旧餐巾送到快洗部,洗一块需 \(m\) 天,其费用为 \(f\) 分;或者送 ...
分类:其他好文   时间:2021-02-20 11:47:22    阅读次数:0
41960条   上一页 1 ... 30 31 32 33 34 ... 4196 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!