暴力枚举,然后用set判重,只是时间复杂度有点儿高。。。#include#include#include#include#include#includeav;i...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-09-10 19:26:00
                            
                                124阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            题意: 给你n个数,要你用光所有数字组成一个三角形,问能组成多少种不同的三角形时间分析: 3^15左右 #include#includeusing namespace std;sets;int _case,n,sum;int ai[20];int Dfs(int a,int b,int c,int m){ if(m==n) { if(a>b||b>c) return 0; if(a&&b&&c&&a+b>c) { s.insert(a*sum*sum+b*sum+c); } ...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-09-13 17:07:00
                            
                                62阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            通过模拟发现让第一停可以得到987654321 让第二停可以得到 989012345 让第三停可以得到 9876 有一点比字典序的意思,要最大肯定最高位最大,模拟到3发现2最优了。 #include<bits/stdc++.h> using namespace std; int main( ) {  ...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2021-10-03 19:21:00
                            
                                135阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            USACO ORZTime Limit: 5000/1500 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3581Accepted Submission(s): 1196Problem D...            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-07-16 14:53:28
                            
                                36阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            USACO ORZTime Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2309 Accepted Submission(s): 826 Problem Description Like everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; n...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-07-26 18:00:00
                            
                                34阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            在现代云计算环境下,使用OpenStack和Kubernetes(K8S)是非常常见的。OpenStack是一个开源的云计算平台,而Kubernetes是一个用于自动化部署、扩展和管理容器化应用程序的开源平台。在这篇文章中,我将向你介绍如何在OpenStack上部署Kubernetes,并给出相应的代码示例。
整个过程可以分为以下步骤:
| 步骤 | 内容               |
|-            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2024-03-13 12:18:43
                            
                                58阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            #include <iostream>
#include <cstdio>
#include <cstring>
#include <set>
#include<algorithm>
 
using namespace std;
set<pair<int,int> >s;
int a[110],n,b[4],fla            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2022-03-10 17:48:56
                            
                                18阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            #include <iostream>
#include <cstdio>
#include <cstring>
#include <set>
#include<algorithm>
 
using namespace std;
set<pair<int,int> >s;
int a[110],n,b[4],fla            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-07-13 14:57:09
                            
                                53阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            简单列了一点 1.1 基本数据结构 1. 数组 2. 链表,双向链表 3. 队列,单调队列,双端队列 4. 栈,单调栈 1.2 中级数据结构 1. 堆 2. 并查集与带权并查集 3. hash 表 自然溢出 双hash 1.3 高级数据结构 1. 树状数组 2. 线段树,线段树合并 3. 平衡树 T            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-04-26 00:29:39
                            
                                501阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            水题放送,写得依旧丑: 1 #include <cstdio> 2 #include <cstring> 3 #include <cmath> 4 #include <algorithm> 5 #include <vector> 6 using namespace std; 7 8 const in            
                
                    
                        
                                                            
                                                                        
                                                                                        原创
                                                                                    
                            2021-07-15 15:31:08
                            
                                31阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            1. 背景
2. 是什么
3. 能做什么
4. 如何实现
5. 优势
6. 问题
7. 展望            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2021-07-30 14:11:00
                            
                                42阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            Problem DescriptionLike everyone, cows enjoy variety. Their current fancy is new shapes for pastures. The old rectangular shapes are out of favor; new...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2015-08-14 20:07:00
                            
                                120阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            USACO ORZ Time Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Like everyone, cows enjoy variety. Thei            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2017-09-22 16:28:00
                            
                                39阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            USACO ORZ Time Limit: 5000/1500 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3809 Accepted Submission(s): 1264 Prob            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2017-06-06 11:21:00
                            
                                68阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            题目大意:有N个木棒,相互组合拼接,能组成多少种不同的三角形。思路:假设c>=b>=a 然后枚举C,在C的dfs里嵌套枚举B的DFS。#include #include #include #include #include #define mod 2000007using namespace std;int n;int X[20];bool vis[20];int ans;long long sum;long long hash[mod];bool ok(int b,int c){ int a=sum-b-c; if(a+b>c && c>=b &            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2013-07-26 18:01:00
                            
                                32阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            http://acm.hdu.edu.cn/showproblem.php?pid=4277题意:给出n条线段,每条线段的长度为li(1 <= li <= 10000)1 <= N <= 15。才开始想到了爆搜算了一下时间复杂度O(3^15)*15勉强可以,可是在判重问题上一直很纠结,不知道该怎么处理,素以就放下了。赛后看了看解题报告,可谓经典啊。。爆搜所有的组合,然后set(或者hash判重),这里由于li<=10000 N <=15 所以最大的长度肯定小于10000000000000000ll,在__int64的表示范围之内,所以我们只需要将a,b, c            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2012-09-12 19:56:00
                            
                                45阅读
                            
                                                                                    
                                2评论
                            
                                                 
                 
                
                             
         
            
            
            
            作为程序员,我们经历过多少风风雨雨,久经沙场,总有一些让人难忘、让人回味的时刻,让我们一起来看看吧!你身边的人总是把你当成修电脑的事实上:我只是大部分时间在Google上搜索问题而已。突...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2023-01-27 00:56:32
                            
                                62阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            挑战DP 题意: 被组合数只能是2的整数幂,然后给出一个数问有多少种组合(mod1e10); 思路: 完全背包做啊…还是蛮简单的…(这里取膜要改成加法,省时间…) dp[i]代表对于j的方案数贴一发吧…#include #include #include #include #inc...            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2016-08-08 17:42:00
                            
                                29阅读
                            
                                                                             
                 
                
                             
         
            
            
            
            向优秀的SLAM大神致敬!            
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2022-09-30 09:23:06
                            
                                551阅读
                            
                                                                             
                 
                
                                
                     
                                    
                             
         
            
            
            
            魔性图
/***                                      *         瓦瓦            十              *        十齱龠己         亅瓦車己             *        乙龍龠毋日丶      丶乙己毋毋丶            *        十龠馬鬼車瓦      己十瓦毋毋                       
                
                    
                        
                                                            
                                                                        
                                                                                        转载
                                                                                    
                            2021-06-19 16:46:58
                            
                                154阅读