自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 收藏
  • 关注

原创 git 上传本地代码

6. git remote add origin ssh地址。5. git commit -m “内容”2.从此处 git bash。1.切换到目标文件夹。

2024-03-06 13:51:36 394

原创 git的密钥管理

请注意,SSH密钥的配置过程可能会因不同的远程仓库服务(如Bitbucket、GitLab等)而略有不同,但大体步骤是相似的。完成以上步骤后,你就已经成功配置了Git的SSH密钥,之后在进行Git操作时就可以使用SSH协议进行身份验证,而无需每次都输入用户名和密码了。配置Git中的SSH密钥主要涉及到生成密钥对和将公钥添加到远程仓库(如GitHub)的过程。在弹出的表单中,给密钥起一个名字(title),然后将之前复制的公钥内容粘贴到“Key”字段中。点击“添加SSH密钥”或类似的按钮完成添加。

2024-03-06 13:21:39 607

原创 P - 你是ACM的希望

背包问题

2023-06-08 11:22:57 490

原创 O - 非常简单的数学题 SDUTOJ4098

运用了dp思想,费马定理,快速幂

2023-06-08 11:06:30 159

原创 Gundam 0079

• 对于本题,我们定义状态 disti,j 为从 1 点出发到达 i 点并还可以减少 j 条边的花费时的最小费用,通过优先队列来决定接下来的方向,每一条边决定是不是要使用加速(通过比较耗费)。u是起始点,v是目标点。• 我们考虑建图的时候每个节点,并不只是图上的一个节点,而是一个状态,每条边是不同状态间的。• 对于这种花里胡哨的最短路题目,只要想好怎么建图剩下的就非常简单了。

2023-06-05 18:17:33 88

原创 codeforces-873 div1 C.回文子串

111

2023-05-20 18:19:32 96

原创 lua实现大数计算

【代码】lua实现大数计算。

2023-05-20 10:23:34 253

原创 线段树模板

【代码】线段树模板。

2023-05-18 14:08:27 40

原创 双层vector的初始化

【代码】双层vector的初始化。

2023-05-16 14:49:53 318

转载 C strtok strtok_s 函数说明 按分隔符分解字符串

strtok_s多了一个参数next_token,strtok_s把剩下的字符串写到next_token里,这样内部就不用记录子字符串等信息了,从而是线程安全的函数。上一个被分割的子字符串的位置会被函数内部记住,所以后续调用时,第1个参数设置为NULL。该函数返回被分解的一个子字符串,如果没有可检索的字符串,则返回一个空指针。子字符串的终点是起点之后第1个含有分隔符的字符,或者整个字符串的终止字符。第1次调用时,第1个参数要传入1个C的字符串,作为要分割的字符串。子字符串的起点是第1个不含分隔符的字符。

2023-05-12 16:43:09 1121

原创 几种二叉树遍历的非递归写法

2023-05-04 14:47:29 64

原创 线段树-poj2482矩形框星星

嗯对

2023-04-26 16:38:38 46

原创 线段树--求矩形并面积HDU1482

2023-04-26 16:37:08 90

原创 c++与lua的实战二

发生

2023-02-28 14:49:07 119

原创 c++与lua实战一

还要

2023-02-27 15:23:44 82

原创 lua的性质

2023-02-22 11:02:44 38

原创 lua基础知识

2023-02-22 10:39:25 53

原创 Lua table的三种下标方式

2023-02-21 17:00:32 542

原创 后端开发简历书写样例

2023-02-15 13:39:57 428

原创 后端开发简历书写样例

2023-02-15 13:38:54 561

原创 java大数计算

package c5;import java.util.Scanner;import java.lang.Math;public class DateTest { public static void main(String args[]){ Scanner cin = new Scanner(System.in); //以文件EOF结束\ BigInteger a,b; while (cin.hasNext()){

2020-11-24 19:23:01 293

原创 前向星的总结

对前向星的几点总结一般的模板void addedge(int u,int v){ edge[cnt].to=v; edge[cnt].next=head[u]; head[u]=cnt++;}2.一般的数据:1 22 33 41 34 11 54 53.解析edge[0].to = 2; edge[0].next = -1; head[1] = 0;edge[1].to = 3; edge[1].next = -1;

2020-06-17 22:03:15 107

原创 原地位操作

class Solution {public: void gameOfLife(vector<vector<int>>& board) { int dx[] = {-1, 0, 1, -1, 1, -1, 0, 1}; int dy[] = {-1, -1, -1, 0, 0, 1, 1, 1}; ...

2020-04-02 21:49:16 199

原创 bfs队列求最短路模板

#include <bits/stdc++.h>using namespace std;char mp[401][401];int n,m,endx,endy;struct node{ int x,y; int step; bool operator < (const node &a) const { return a....

2020-03-23 21:36:34 144

转载 字符串的分割

#include#includeusing namespace std;void main(){string s(“12345asdf”);string a=s.substr(0,5);cout<<a<<endl;}上述代码获得字符串s中 从第0位开始的长度为5的字符串.默认时的长度为从开始位置到尾输出结果为:12345#include<bit...

2020-03-22 08:48:36 95

原创 文件方式输入输出

#include<stdio.h>#include<bits/stdc++.h>int x,y,x1,x2,y1,y2;using namespace std;const int maxn=2e5+10;int main(){ FILE *in,*out; in=fopen("anniversary.in","r"); out=fopen("ann...

2020-03-16 19:24:34 146

原创 关于瞬时排名multiset的应用G - Galactic Collegiate Programming Contest

题目大意:给出你参赛者ac题目的清单啊,n,a,b.n个人,a某人做出来一道题,用了b时间。让你计算编号为1的人的排名。#include <iostream>#include <bits/stdc++.h>using namespace std;const int maxn=1e6+10;struct node{ int x,y,id; bool...

2020-03-16 16:19:44 159

原创 codeforces 1311-c

方法一:打表#include<bits/stdc++.h>using namespace std;const int maxn=2e5+10;int mis[maxn];int main(){ int zi[200]; int z1[27][maxn]; int t,x,y; char a[maxn]; scanf("%d",&...

2020-02-28 10:15:47 205 1

原创 map(string,int)的运用

using namespace std;#include<bits/stdc++.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <iostream>#define LL long long#define INF 0x3f3f3f3fma...

2020-02-23 21:25:20 6748

原创 求多边形的面积-全部是顶点的情况

#include <stdio.h>#include <string.h>#include <stdlib.h>using namespace std;typedef long long ll;#define INF 0x3f3f3f3f#include<bits/stdc++.h>#include<cstring>#i...

2020-02-22 20:26:46 161

原创 关于优先队列在图中的应用G - Millionaire Madness Kattis - millionairemadness

G - Millionaire Madness Kattis - millionairemadness 文章大意:就是给你一个n*m的图(int)代表货物的高度),可以上下左右移动一次一格,但是去高度高(比原来的地方)的地方得使用梯子。求从最左上点到最右下的点,最少要用多长的梯子?。题目分析:就是一个bfs还要用到优先队列,这是个很方便的工具...

2020-02-16 21:49:47 1962

原创 关于快速幂的运用G - Maximum Palindromes HackerRank - maximum-palindromes

一道关于快速幂的题目,没做过几道这种题目,本人原来没能做出来,现在写出来自己现在看这道题的一些体会G - Maximum PalindromesMadam Hannah Otto, the CEO of Reviver Corp., is fond of palindromes, or words that read the same forwards or backwards. She th...

2020-02-15 17:53:17 587

原创 B - Super Mancunian HackerRank - super-mancunian并查集与最小生成树

题目大意:求最小生成树但可以减去一条边(当然要减最大的那个了)。思路:可以用并查集来存图,找出最大值,用是否为父亲节点来判断是否为新的点。再次遍历一遍,pre[]数组置-1,如果有先判断是否产生环(判断pre[]是否相等)。再判断是否大于等于最大值,是的话就多出一种。否则就u的父亲节点归到v的父亲节点的门下,继续遍历。...

2020-02-13 22:01:52 205

原创 Weird Cryptography Gym - 100935B 单词分组问题

Khaled was sitting in the garden under an apple tree, suddenly! , well… you should guess what happened, an apple fell on his head! , so he came up with a new Cryptography method!!The method deals onl...

2020-02-09 12:13:53 204

原创 Gym-102448 dp问题

K - Kongey Donk Gym - 102448K The monkey Kongey Donk loves to eat bananas, but he is always really tired. Kongey lives in a region that has nn banana trees lined in a row, and he...

2020-02-08 11:15:55 215

转载 马拉车算法manacher解决回文问题

一:背景给定一个字符串,求出其最长回文子串。例如:s=“abcd”,最长回文长度为 1;s=“ababa”,最长回文长度为 5;s=“abccb”,最长回文长度为 4,即 bccb。以上问题的传统思路大概是,遍历每一个字符,以该字符为中心向两边查找。其时间复杂度为 O(n2),效率很差。1975 年,一个叫 Manacher 的人发明了一个算法,Manacher 算法(中文名:马拉车算法),该...

2020-02-07 16:40:29 217

原创 gym-101498

D - Counting Paths Gym - 101498D A binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child....

2020-02-06 10:36:15 169

原创 素数筛

#include #include <bits/stdc++.h>using namespace std;const int maxn=10000100;const int maxm=10000100;int mark[maxm];int Prime[maxm];bool judge(int t){if(t<=1) return false;for(int i...

2020-02-04 12:34:40 94

原创 前向星模板

前向星模板#include <stdio.h>#include <string.h>#include <stdlib.h>#include using namespace std ;#define LL long long#define INF 0x3f3f3f3f#include<bits/stdc++.h>const int m...

2020-02-03 22:03:40 156

原创 KMP算法模板

@[TOC]KMP算法模板#include <stdio.h>#include <string.h>#include <stdlib.h>int next[1000000];void getnext(char *b){ int len=strlen(b); // 待匹配字符串的长度 int i; n...

2019-12-31 16:31:10 173

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除