dxyinme-Zz

还请各位不要放弃希望
私信 关注
dxyinme
码龄5年
  • 84,718
    被访问量
  • 305
    原创文章
  • 25,835
    作者排名
  • 31
    粉丝数量
  • 于 2016-08-08 加入CSDN
获得成就
  • 获得24次点赞
  • 内容获得26次评论
  • 获得70次收藏
荣誉勋章
TA的专栏
  • 随笔
    9篇
  • -----------数据结构
    62篇
  • 平衡树
    6篇
  • 堆
    3篇
  • 线段树
    21篇
  • 栈
    4篇
  • 树状数组
    9篇
  • set
    3篇
  • 莫队算法
    5篇
  • bitset
    2篇
  • map
    3篇
  • 主席树
    1篇
  • 并查集
    7篇
  • ST表
    2篇
  • --------------------动态规划
    48篇
  • 递推
    17篇
  • 树形动态规划
    5篇
  • 区间动态规划
    4篇
  • 数位动态规划
    3篇
  • 状态压缩动态规划
    4篇
  • 背包型动态规划
    8篇
  • 四边形不等式
    2篇
  • -----------------图论
    79篇
  • 网络流
    8篇
  • 最短路
    17篇
  • 最近公共祖先
    4篇
  • tarjan
    6篇
  • 拓扑排序
    6篇
  • 树链剖分
    2篇
  • 差分约束
    2篇
  • 生成树
    10篇
  • floyd
    3篇
  • 最大流
    2篇
  • spfa
    5篇
  • 二分图匹配
    2篇
  • 图的遍历
    20篇
  • -----------------------倍增
    2篇
  • ---------------------分治
    12篇
  • 归并排序
    1篇
  • ---------------------数学
    30篇
  • 欧拉函数
    1篇
  • 拓展欧几里得
    1篇
  • 高斯消元
    1篇
  • 线性基
    4篇
  • ----------------------模拟
    20篇
  • -------------------乱搞
    41篇
  • -----------------------归纳
    13篇
  • ---------------计算几何
    9篇
  • ---------------------搜索
    14篇
  • 广搜
    9篇
  • 深搜
    15篇
  • ------------------字符串
    26篇
  • AC自动机
    4篇
  • kmp
    1篇
  • trie
    5篇
  • 最小表示法
    1篇
  • 后缀数组
    1篇
  • 回文自动机
    6篇
  • -------------------xjb玩的东西
    4篇
  • --------------------------博弈
    3篇
  • java
    11篇
  • Go
    1篇
  • linux
  • 最近
  • 文章
  • 资源
  • 问答
  • 课程
  • 帖子
  • 收藏
  • 关注/订阅

[2019 ICPC Asia Nanchang Regional]Resistance

source题意: 太长了自己看吧,大模拟罢了谨以此题纪念一去不复返的acm生涯#include <bits/stdc++.h>using namespace std;const int INF = 2e9;const int MAXN = 404;const int GUN = 1;const int BUNKER = 2;const int PRIVATE = 1;const int CAPTAIN = 2;char emchar[MAXN];int n,k,L,E
原创
34阅读
0评论
0点赞
发布博客于 3 月前

[nowcoder]红球进黑洞

题目链接:https://ac.nowcoder.com/acm/contest/6046/C时间限制:C/C++ 3秒,其他语言6秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述在心理疏导室中有一种奇特的疏导工具,叫做红球。红球被提前分为了许多正方形小方格。每当有人来找ATB做心理疏导时,ATB就会让他去先玩红球,然后通过红球小格方的高度来判断一个人的压力程度的高低具体地讲,ATB会让该人对于一个序列执行以下操作区间求和,
原创
88阅读
0评论
0点赞
发布博客于 8 月前

INOI选做...

退役选手复健Free ticket题解:floyd之后直接找最大值。/**https://www.codechef.com/INOIPRAC/problems/INOI1402*/#include<bits/stdc++.h>#define ll long longusing namespace std;const int INF = 1e9 + 4;const ...
原创
121阅读
0评论
0点赞
发布博客于 1 年前

[HDU6081]度度熊的王国战略

Time Limit: 40000/20000 MS (Java/Others)Memory Limit: 32768/132768 K (Java/Others)Problem Description度度熊国王率领着喵哈哈族的勇士,准备进攻哗啦啦族。哗啦啦族是一个强悍的民族,里面有充满智慧的谋士,拥有无穷力量的战士。所以这一场战争,将会十分艰难。为了更好的进攻哗啦啦族,度度熊决定首先...
原创
117阅读
0评论
1点赞
发布博客于 2 年前

[hdu6230]Palindrome

Time Limit: 6000/3000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionAlice like strings, especially long strings. For each string, she has a special evaluation system...
原创
54阅读
0评论
0点赞
发布博客于 2 年前

[hdu6290]奢侈的旅行

Time Limit: 14000/7000 MS (Java/Others)Memory Limit: 512000/512000 K (Java/Others)Problem Description高玩小Q不仅喜欢玩寻宝游戏,还喜欢一款升级养成类游戏。在这个游戏的世界地图中一共有n个城镇,编号依次为1到n。这些城镇之间有m条单向道路,第iii 条单项道路包含四个参数ui,vi,ai,b...
原创
97阅读
0评论
0点赞
发布博客于 2 年前

[gym101620G] Gambling Guide

Time limit: 3 sMemory limit: 512 MiBA railroad network in a nearby country consists of nnn cities numbered 111 through nnn , and mmm two-wayrailroad tracks each connecting two different cities. Tic...
原创
124阅读
0评论
0点赞
发布博客于 2 年前

[gym102267L]ABC

time limit per test : 1.0 smemory limit per test : 256 MBYou are given a string consisting of letters ′a′,′b′'a', 'b'′a′,′b′ and ′c′'c'′c′, and there are 444 kinds of operations you can do on it:Re...
原创
110阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1219G]Harvester

time limit per test : 0.5 secondsmemory limit per test : 256 megabytesIt is Bubble Cup finals season and farmer Johnny Bubbles must harvest his bubbles. The bubbles are in a rectangular bubblefield ...
原创
380阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1202C]You Are Given a WASD-string...

time limit per test : 2 secondsmemory limit per test : 256 megabytesYou have a string sss— a sequence of commands for your toy robot. The robot is placed in some cell of a rectangular grid. He can p...
原创
403阅读
0评论
1点赞
发布博客于 2 年前

[codeforces1202E]You Are Given Some Strings...

time limit per test : 3 secondsmemory limit per test : 256 megabytes分数:2500You are given a string t and n strings s1,s2,…,sns_1,s_2,…,s_ns1​,s2​,…,sn​. All strings consist of lowercase Latin letter...
原创
145阅读
0评论
0点赞
发布博客于 2 年前

[codeforces938D]Buy a Ticket

time limit per test : 2 secondsmemory limit per test : 256 megabytesMusicians of a popular band “Flayer” have announced that they are going to “make their exit” with a world tour. Of course, they wi...
原创
139阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1200E]Compress Words

time limit per test : 1 secondmemory limit per test : 256 megabytes分数:2000,但是我觉得这个题挺神的。Amugae has a sentence consisting of nnn words. He want to compress this sentence into one word. Amugae doesn’t...
原创
104阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1073E]Segment Sum

time limit per test : 1 secondmemory limit per test : 256 megabytes分数:2300You are given two integers lll and r(l≤r)r (l≤r)r(l≤r). Your task is to calculate the sum of numbers from lll to rrr (inclu...
原创
94阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1214D]Treasure Island

time limit per test : 1 secondmemory limit per test : 512 megabytes分数:1800 但是感觉确实有难度()All of us love treasures, right? That’s why young Vasya is heading for a Treasure Island.Treasure Island may b...
原创
220阅读
3评论
1点赞
发布博客于 2 年前

[codeforces1217D]Coloring Edges

time limit per test : 1 secondmemory limit per test : 256 megabytes分数:2000You are given a directed graph with nnn vertices and mmm directed edges without self-loops or multiple edges.Let’s denote ...
原创
111阅读
0评论
0点赞
发布博客于 2 年前

[gym102012K]Rikka with Ants

time limit per test : 4.0 smemory limit per test : 1024 MBEvery time when Rikka faces to a great nature sight, she will recall a line of ants moving in a hurry. Rikka loves ants and keeps two large ...
原创
163阅读
0评论
0点赞
发布博客于 2 年前

[gym102012C]Rikka with Consistency

time limit per test : 8.0 smemory limit per test : 1024 MBOn the way to the Moscow, Rikka knows someone will replace her. Who is the guy? A devil to get in touch with her dark side, or an angel to r...
原创
270阅读
2评论
0点赞
发布博客于 2 年前

[hdu5584]LCM Walk

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionA frog has just learned some number theory, and can’t wait to show his ability to his girlfriend.N...
原创
95阅读
0评论
0点赞
发布博客于 2 年前

[HDU5573]Binary Tree

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)分数:2500,构造还是比较难的Problem DescriptionThe Old Frog King lives on the root of an infinite tree. According to the law, eac...
原创
54阅读
0评论
0点赞
发布博客于 2 年前

[codeforces28A]Bender Problem

time limit per test : 2 secondsmemory limit per test : 256 megabytesRobot Bender decided to make Fray a birthday present. He drove n nails and numbered them from 1 to nnn in some order. Bender decid...
原创
68阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1208D]Restore Permutation

time limit per test : 2 secondsmemory limit per test : 256 megabytesAn array of integers p1,p2,…,pnp_1,p_2,…,p_np1​,p2​,…,pn​ is called a permutation if it contains each number from 111 to nnn exact...
原创
117阅读
0评论
0点赞
发布博客于 2 年前

[codeforces23C]Oranges and Apples

time limit per test : 1.5 secondsmemory limit per test : 256 megabytes分数:2500(补的有趣的老题)In 2N − 12N - 12N − 1 boxes there are apples and oranges. Your task is to choose NNN boxes so, that they will c...
原创
77阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1207F]Remainder Problem

time limit per test : 4 secondsmemory limit per test : 512 megabytes分数:2100You are given an array aaa consisting of 500000 integers (numbered from 1 to 500000). Initially all elements of aaa are ze...
原创
144阅读
0评论
0点赞
发布博客于 2 年前

[gym102222K]Vertex Covers

time limit per test : 10.0 smemory limit per test : 256 MBIn graph theory, a vertex cover of a graph GGG is a set of vertices SSS such that each edge of the graph is incident to at least one vertex ...
原创
202阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1196F]K-th Path

time limit per test : 2.5 secondsmemory limit per test : 256 megabytesYou are given a connected undirected weighted graph consisting of nnn vertices and mmm edges.You need to print the kkk-th small...
原创
111阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1205B]Shortest Cycle

time limit per test : 1 secondmemory limit per test : 256 megabytesYou are given nnn integer numbers a1,a2,…,ana_1,a_2,…,a_na1​,a2​,…,an​. Consider graph on nnn nodes, in which nodes i,j(ii, j (ii,j...
原创
173阅读
0评论
0点赞
发布博客于 2 年前

[codeforces906E]Reverses

time limit per test : 2 secondsmemory limit per test : 256 megabytes分数:3200Hurricane came to Berland and to suburbs Stringsvill. You are going to it to check if it’s all right with you favorite str...
原创
99阅读
0评论
0点赞
发布博客于 2 年前

[poj3368]Frequent values

Time Limit: 2000MS Memory Limit: 65536K分数:2100,小思维题DescriptionYou are given a sequence of n integers a1,a2,...,ana_1 , a_2 , ... , a_na1​,a2​,...,an​ in non-decreasing order. In addition to that,...
原创
76阅读
0评论
0点赞
发布博客于 2 年前

[学习]整体二分

在?看看整体二分整体二分是个啥,就是递归进行二分答案的操作,按照当前二分出的区间对询问操作和修改操作进行左右分类。有点类似于归并排序的样子,但是需要用个维护区间的数据结构来维护当前询问区间的区间的查询和修改操作,每次查询完当前区间的操作之后,需要清空之前的修改操作。整体二分可以保证会互相影响的操作可以按照顺序进行。但是本质还是离线算法。这样执行的操作时间复杂度是O(M∗log(ans)∗log...
原创
61阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1203F1]Complete the Projects (easy version)

time limit per test : 2 secondsmemory limit per test : 256 megabytesThe only difference between easy and hard versions is that you should complete all the projects in easy version but this is not ne...
原创
425阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客多校训练第3场]Median

链接:https://ac.nowcoder.com/acm/contest/883/I来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536KSpecial Judge, 64bit IO Format: %lld分数:2500题目描述JSB has an integer sequence a1,a2,…,ana_1, a_2, ...
原创
141阅读
0评论
0点赞
发布博客于 2 年前

[hdu6586]String

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionTom has a string containing only lowercase letters. He wants to choose a subsequence of the strin...
原创
97阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客多校训练第8场]Distance

链接:https://ac.nowcoder.com/acm/contest/888/D来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 524288K,其他语言1048576K64bit IO Format: %lld分数:2500 前期题但是貌似没想到题目描述Gromah and LZR have entered the fourth level. The...
原创
114阅读
0评论
0点赞
发布博客于 2 年前

[hdu6570]Wave

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Problem DescriptionAvin is studying series. A series is called “wave” if the following conditions are satisfied:It...
原创
139阅读
0评论
0点赞
发布博客于 2 年前

[hdu6567]Cotree

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)分数:2500Problem DescriptionAvin has two trees which are not connected. He asks you to add an edge between them to ma...
原创
82阅读
0评论
0点赞
发布博客于 2 年前

[hdu6574]Rng

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)分数:2300,推算过程有点困难。Problem DescriptionAvin is studying how to synthesize data. Given an integer nnn, he constructs an...
原创
93阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客多校训练第7场]Pair

链接:https://ac.nowcoder.com/acm/contest/887/H来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K分数:我觉得有2500+…链接:https://ac.nowcoder.com/acm/contest/887/H来源:牛客网题目描述Given three integers A,B ,C...
原创
77阅读
0评论
1点赞
发布博客于 2 年前

[HDU6639]Faraway

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 524288/524288 K (Java/Others)Problem Descriptionn soldiers are dispatched to somewhere in Byteland. These soldiers are going to set off now, but ...
原创
120阅读
0评论
0点赞
发布博客于 2 年前

[HDU6631]line symmetric

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)分数:2800+Problem DescriptionYou are given a simple polygon in a two-dimensional plane. Please check whether we can m...
原创
190阅读
0评论
0点赞
发布博客于 2 年前

[AtCoder Beginner Contest 136]Max GCD

https://atcoder.jp/contests/abc136/tasks/abc136_e分数:2100Time Limit: 2 secMemory Limit: 1024 MBProblem StatementWe have a sequence of NNN integers: A1,A2,⋯,ANA_1,A_2,⋯,A_NA1​,A2​,⋯,AN​.You can pe...
原创
92阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客多校训练第6场]Palindrome Mouse

链接:https://ac.nowcoder.com/acm/contest/886/C来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K分数:2800题目描述Doctor has a string sss consisting of only lowercase letters. Doctor has got the se...
原创
57阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客多校训练第5场]generator 1

链接:https://ac.nowcoder.com/acm/contest/885/B来源:牛客网时间限制:C/C++ 2秒,其他语言4秒空间限制:C/C++ 262144K,其他语言524288K分数:2500题目描述You are given four positive integers x0,x1,a,bx_0, x_1, a, bx0​,x1​,a,b. And you kn...
原创
42阅读
0评论
0点赞
发布博客于 2 年前

[codeforces796D]Police Stations

time limit per test : 2 secondsmemory limit per test : 256 megabytes分数:2100Inzane finally found Zane with a lot of money to spare, so they together decided to establish a country of their own.Ruli...
原创
66阅读
0评论
0点赞
发布博客于 2 年前

[codeforces19E]Fairy

time limit per test : 1.5 secondsmemory limit per test : 256 megabytes分数:2800Once upon a time there lived a good fairy A. One day a fine young man B came to her and asked to predict his future. The...
原创
353阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客多校训练第五场]three points 1

时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K链接:https://ac.nowcoder.com/acm/contest/885/I来源:牛客网分数:2800+,我觉得卡精度很恶心题目描述You are given five positive integers w,h,a,b,cw, h, a, b, cw,h,a,b,c. Pl...
原创
283阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客多校训练第4场]xor

时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 524288K,其他语言1048576K链接:https://ac.nowcoder.com/acm/contest/884/B来源:牛客网题目描述Your are given nnn sets.Every set contains some integers.We say a set can express an inte...
原创
59阅读
0评论
0点赞
发布博客于 2 年前

[hdu6611]K Subsequence

Problem DescriptionMaster QWsin is dating with Sindar. And now they are in a restaurant, the restaurant has n dishes in order. For each dish, it has a delicious value ai. However, they can only order...
原创
58阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1184A2]Heidi Learns Hashing (Medium)

time limit per test : 2 secondsmemory limit per test : 256 megabytes分数:2100 // 虽然我觉得思维难度还挺高的,像是2500的题,不像普通的2100那么简单After learning about polynomial hashing, Heidi decided to learn about shift-xor ha...
原创
117阅读
0评论
0点赞
发布博客于 2 年前

[hdu5421]Victor and String

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 524288/262144 K (Java/Others)Victor loves to play with string. He thinks a string is charming as the string is a palindromic string.Victor wants ...
原创
40阅读
0评论
0点赞
发布博客于 2 年前

[BZOJ3676][Apio2014]回文串

Time Limit: 20 SecMemory Limit: 128 MBDescription考虑一个只包含小写拉丁字母的字符串sss。我们定义sss的一个子串ttt的“出现值”为t在s中的出现次数乘以t的长度。请你求出sss的所有回文子串中的最大出现值。Input输入只有一行,为一个只包含小写字母(a−z)(a -z)(a−z)的非空字符串sss。Output输出一个整数,为逝...
原创
40阅读
0评论
0点赞
发布博客于 2 年前

[ACM-ICPC 2018 南京赛区网络预赛]Skr

地址:https://nanti.jisuanke.com/t/A1955A number is skr, if and only if it’s unchanged after being reversed. For example, “12321”, “11” and “1” are skr numbers, but “123”, “221” are not. FYW has a strin...
原创
63阅读
0评论
0点赞
发布博客于 2 年前

[hdu6599]I Love Palindrome String

Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionYou are given a string S=s1s2..s∣S∣S=s_1s_2..s_{|S|}S=s1​s2​..s∣S∣​ containing only lowercase Eng...
原创
75阅读
0评论
0点赞
发布博客于 2 年前

[codeforces920E]Connected Components?

time limit per test : 2 secondsmemory limit per test : 256 megabytes分数:2100You are given an undirected graph consisting of nnn vertices and edges. Instead of giving you the edges that exist in the ...
原创
77阅读
0评论
0点赞
发布博客于 2 年前

[codeforces920F]SUM and REPLACE

time limit per test : 2 secondsmemory limit per test : 256 megabytes分数:2000Let D(x)D(x)D(x) be the number of positive divisors of a positive integer xxx. For example, D(2) = 2D(2) = 2D(2) = 2 (222 ...
原创
57阅读
0评论
0点赞
发布博客于 2 年前

[codeforces830C]Bamboo Partition

time limit per test : 2 secondsmemory limit per test : 512 megabytes分数:2500Vladimir wants to modernize partitions in his office. To make the office more comfortable he decided to remove a partition...
原创
123阅读
0评论
0点赞
发布博客于 2 年前

[codeforces 1183F]Topforces Strikes Back

time limit per test : 3 secondsmemory limit per test : 256 megabytesOne important contest will take place on the most famous programming platform (Topforces) very soon!The authors have a pool of nn...
原创
69阅读
0评论
0点赞
发布博客于 2 年前

[codeforces 1141G]Privatization of Roads in Treeland

time limit per test : 2 secondsmemory limit per test : 256 megabytes分数:2500Treeland consists of nnn cities and n−1n−1n−1 roads. Each road is bidirectional and connects two distinct cities. From any...
原创
40阅读
0评论
0点赞
发布博客于 2 年前

[学习]线性基

定义设数集TTT的值域范围为[1,2n−1][1,2^{n−1}][1,2n−1]。TTT的线性基是TTT的一个子集A=a1,a2,a3,...,anA={a_1,a_2,a_3,...,a_n}A=a1​,a2​,a3​,...,an​。AAA中元素互相xor所形成的异或集合,等价于原数集TTT的元素互相xor形成的异或集合。可以理解为将原数集进行了压缩。性质1.设线性基的异或集合中...
转载
64阅读
0评论
0点赞
发布博客于 2 年前

[BZOJ2460][BeiJing2011]元素

Time Limit: 20 SecMemory Limit: 128 MBDescription相传,在远古时期,位于西方大陆的 Magic Land 上,人们已经掌握了用魔法矿石炼制法杖的技术。那时人们就认识到,一个法杖的法力取决于使用的矿石。一般地,矿石越多则法力越强,但物极必反:有时,人们为了获取更强的法力而使用了很多矿石,却在炼制过程中发现魔法矿石全部消失了,从而无法炼制出法杖,这...
原创
47阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客网多校训练第1场]XOR

链接:https://ac.nowcoder.com/acm/contest/881/H来源:牛客网题目描述Bobo has a set A of nnn integers a1,a2,…,ana_1,a_2,…,a_na1​,a2​,…,an​.He wants to know the sum of sizes for all subsets of A whose xor sum is ...
原创
339阅读
0评论
0点赞
发布博客于 2 年前

[2019牛客网多校训练第1场]Euclidean Distance

链接:https://ac.nowcoder.com/acm/contest/881/C来源:牛客网Bobo has a point A in the nnn dimension real space RnR_nRn​, whose coodinate is (a1/m,a2/m,…,an/m)(a_1/m,a_2/m,…,a_n/m)(a1​/m,a2​/m,…,an​/m) where a...
原创
926阅读
5评论
1点赞
发布博客于 2 年前

[hdu6562][CCPC2018吉林站]Lovers

Problem DescriptionThe Fool comes to a cross-road, filled with energy, confidence and purpose, knowing exactly where he wants to go and what he wants to do. But he comes to a dead stop. A flowering t...
原创
204阅读
0评论
0点赞
发布博客于 2 年前

[codeforces 508D]Tanya and Password

time limit per test : 2 secondsmemory limit per test : 256 megabytesWhile dad was at work, a little girl Tanya decided to play with dad’s password to his secret database. Dad’s password is a string ...
原创
96阅读
0评论
0点赞
发布博客于 2 年前

[codeforces 1187D]Subarray Sorting

time limit per test:2 secondsmemory limit per test:256 megabytesYou are given an array a1a_1a1​,a2a_2a2​,…,ana_nan​ and an array b1b_1b1​,b2b_2b2​,…,bnb_nbn​.For one operation you can sort in non-d...
原创
124阅读
0评论
0点赞
发布博客于 2 年前

[AtCoder Grand Contest 035]

A. XOR Circle题意:给定n(n&lt;=105)n(n&lt;=10^5)n(n<=105)个数字a[1]a[1]a[1]~a[n]a[n]a[n],询问是否能够将其重排成一个首位相接的环形数组,使得每个a[i](1&lt;=i&lt;=n)a[i](1&lt;=i&lt;=n)a[i](1<=i<=n)等于与其相邻...
原创
156阅读
0评论
0点赞
发布博客于 2 年前

[codeforces917B]MADMAX

time limit per test : 1 secondmemory limit per test : 256 megabytesAs we all know, Max is the best video game player among her friends. Her friends were so jealous of hers, that they created an actu...
原创
238阅读
0评论
1点赞
发布博客于 2 年前

[hdu3118]Arbiter

Time Limit: 1000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Problem DescriptionArbiter is a kind of starship in the StarCraft science-fiction series. The Arbiter-class starship...
原创
91阅读
0评论
1点赞
发布博客于 2 年前

[hdu4217]Data Structure?

Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/65536 K (Java/Others)Problem DescriptionData structure is one of the basic skills for Computer Science students, which is a particular way...
原创
73阅读
0评论
0点赞
发布博客于 2 年前

linux下切换python2和python3(转)

采用update-alternatives 切换版本1.打开终端:Ctrl+Alt+T2.查看update-alternatives的帮助信息:update-alternatives --help3.查看有没有python可选项:update-alternatives --display python4.如果没有,输入下面的命令建立python可选项sudo update-alterna...
转载
267阅读
0评论
1点赞
发布博客于 2 年前

[codeforces1187E]Tree Painting

time limit per test : 2 secondsmemory limit per test : 256 megabytesYou are given a tree (an undirected connected acyclic graph) consisting of nnn vertices. You are playing a game on this tree.Init...
原创
383阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1095F]Make It Connected

time limit per test : 2 secondsmemory limit per test : 256 megabytesYou are given an undirected graph consisting of nnn vertices. A number is written on each vertex; the number on vertex iii is aia_...
原创
139阅读
0评论
0点赞
发布博客于 2 年前

[codeforces803C]Maximal GCD

time limit per test : 1 secondmemory limit per test : 256 megabytesYou are given positive integer number nnn. You should create such strictly increasing sequence of kkk positive numbers a1, a2, ...,...
原创
40阅读
0评论
0点赞
发布博客于 2 年前

[codeforces797E]Array Queries

time limit per test : 2 secondsmemory limit per test : 256 megabytesaaa is an array of n positive integers, all of which are not greater than nnn.You have to process q queries to this array. Each q...
原创
48阅读
0评论
1点赞
发布博客于 2 年前

[codeforces1096F]Inversion Expectation

time limit per test : 2 secondsmemory limit per test : 256 megabytesA permutation of size nnn is an array of size nnn such that each integer from 111 to nnn occurs exactly once in this array. An inv...
原创
100阅读
0评论
0点赞
发布博客于 2 年前

[Java多线程的线程池相关]

当Java要开始多线程的时候,个人感觉直接start线程对于线程的管理非常不利,然后就去查了一下有没有比较方便的线程管理办法。查了一下好像还真有,主要是这两个库:有下面这4种线程池类型newCachedThreadPool创建一个可缓存线程池,如果线程池长度超过处理需要,可灵活回收空闲线程,若无可回收,则新建线程。newFixedThreadPool 创建一个定长线程池,可控制线程最大并...
原创
61阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1132F]Clear the String

time limit per test : 3 secondsmemory limit per test : 256 megabytesYou are given a string sss of length nnn consisting of lowercase Latin letters. You may apply some operations to this string: in o...
原创
97阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1154F]Shovels Shop

time limit per test : 2 secondsmemory limit per test : 256 megabyteshere are nnn shovels in the nearby shop. The iii-th shovel costs aibourles.Misha has to buy exactly kkk shovels. Each shovel can ...
原创
106阅读
0评论
0点赞
发布博客于 2 年前

[hdu1251]统计难题

Time Limit: 4000/2000 MS (Java/Others)Memory Limit: 131070/65535 K (Java/Others)Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀).Input输入数据的第...
原创
54阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1158B]The minimal unique substring

time limit per test : 1 secondmemory limit per test : 256 megabytesLet s be some string consisting of symbols “0” or “1”. Let’s call a string t a substring of string s, if there exists such number 1...
原创
305阅读
0评论
0点赞
发布博客于 2 年前

Netbeans使用动态代码检查

NetBeans有非常强大的动态代码检查工具使用方式如下:点击 分析项目选择要分析的东西然后按 ‘分析’ ,他就会自动构建工程并开始分析相关的内容这是分析对象的这是分析方法的这是分析内存和堆栈(遥测)的...
原创
316阅读
0评论
0点赞
发布博客于 2 年前

Go语言工程相关踩坑

Golang工程调用另一个包的函数的时候,这个函数的首字母一定要是大写!构建工程之前,当前目录必须被添加到系统环境变量中的GOPATH中。可以使用go install <packageName>来将这一个package添加到工程根目录的pkg文件夹中(会生成一个和包名称相同的.a文件)所以说,构建工程之前,需要先把src里面的所有包都go install 了,然...
原创
82阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1163C2]Power Transmission (Hard Edition)

This problem is same as the previous one, but has larger constraints.It was a Sunday morning when the three friends Selena, Shiro and Katie decided to have a trip to the nearby power station (do not ...
原创
287阅读
0评论
0点赞
发布博客于 2 年前

[java]对于java.util.logging的一些使用总结

这是一个java自带的日志类使用日志的时候别忘了import这两个import java.util.logging.*;import static java.util.logging.Logger.getLogger;1.创建一个对应当前类的loggerstatic final Logger logger = getLogger(CommandInfoReader.class.getN...
原创
270阅读
0评论
0点赞
发布博客于 2 年前

[codeforces327E]Axis Walking

time limit per test : 3 secondsmemory limit per test : 512 megabytesIahub wants to meet his girlfriend Iahubina. They both live in Ox axis (the horizontal axis). Iahub lives at point 000 and Iahubin...
原创
62阅读
0评论
0点赞
发布博客于 2 年前

[codeforces741C] Arpa’s overnight party and Mehrdad’s silent entering

time limit per test : 1 secondmemory limit per test : 256 megabytesNote that girls in Arpa’s land are really attractive.Arpa loves overnight parties. In the middle of one of these parties Mehrdad s...
原创
107阅读
0评论
0点赞
发布博客于 2 年前

[codeforces965E]Short Code

time limit per test : 1 secondmemory limit per test : 256 megabytesArkady’s code contains nnn variables. Each variable has a unique name consisting of lowercase English letters only. One day Ark...
原创
137阅读
0评论
0点赞
发布博客于 2 年前

[codeforces936C]Lock Puzzle

time limit per test : 2 secondsmemory limit per test : 256 megabytesWelcome to another task about breaking the code lock! Explorers Whitfield and Martin came across an unusual safe, inside of wh...
原创
99阅读
0评论
0点赞
发布博客于 2 年前

[codeforces923D]Picking Strings

time limit per test : 2 secondsmemory limit per test : 256 megabytesAlice has a string consisting of characters ′A′&#x27;A&#x27;′A′, ′B′&#x27;B&#x27;′B′ and ′C′&#x27;C&#x27;′...
原创
228阅读
0评论
0点赞
发布博客于 2 年前

[codeforces803G]Periodic RMQ Problem

time limit per test : 4 secondsmemory limit per test : 512 megabytesYou are given an array aaa consisting of positive integers and qqq queries to this array. There are two types of queries:111 lll ...
原创
86阅读
0评论
0点赞
发布博客于 2 年前

[java Graphics踩坑]

Graphics里面的drawXXX(int x,int y,int width,int height)都是在一个左上角为(x,y),长度为width,宽度为height的一个幕布上画出来的。…
原创
117阅读
0评论
0点赞
发布博客于 2 年前

[codeforces813E]Army Creation

time limit per test : 2 secondsmemory limit per test : 256 megabytesAs you might remember from our previous rounds, Vova really likes computer games. Now he is playing a strategy game known as Rage ...
原创
102阅读
0评论
0点赞
发布博客于 2 年前

[codeforces][gym102062]2018 Battle of Brains

抽了小半天空做了一下这套题…A.简单坑题,由于英文不好被题意gank了,判断(a+b+c+d)*2是否大于等于n+1…#include<bits/stdc++.h>#define LiangJiaJun mainusing namespace std;int T,n,a,b,c,d;int w33ha(){ scanf("%d%d%d%d%d",&n,&a...
原创
157阅读
0评论
0点赞
发布博客于 2 年前

[codeforces1139C]Edgy Trees

time limit per test : 2 secondsmemory limit per test : 256 megabytesYou are given a tree (a connected undirected graph without cycles) of nnn vertices. Each of the n−1n−1n−1 edges of the tree is col...
原创
158阅读
0评论
0点赞
发布博客于 2 年前

关于javaOOP的一些知识总结

Override重写1.表示重新实现一个已有的方法。2.构造方法不能被重写。3.父类中的方法如果是final的,则不能被继承他的子类所重写。4.若子类中重载了父类的一个方法( 例如QQQ() )则如果子类要调用父类中的QQQ()方法时,需要调用super.QQQ()Overload重载1.表示对同一个方法名的不同实现,这个需要保证不同的方法拥有不同的参数列表(参数数量或者参数类型)...
原创
137阅读
0评论
0点赞
发布博客于 2 年前

[HDU2969]Skyscrapers

Time Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionIn a seaside village, there is an avenue of skyscrapers. Each skyscrapers is 100m wide and has cer...
原创
169阅读
0评论
0点赞
发布博客于 2 年前

[HDU2540]遮挡判断

Time Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description在一个广场上有一排沿着东西方向排列的石柱子,阳光从东边以一定的倾角射来(平行光)。有的柱子可能被在他东边的高大的柱子的影子给完全遮挡住了。现在你要解决的问题是求出有多少柱子是没有被完全遮挡住的。...
原创
86阅读
0评论
0点赞
发布博客于 2 年前

Java的ADT使用泛型

JAVA也有跟其他计算机语言一样的抽象数据类型下面是试例public class ADTtest &lt;L&gt;{ public L name; public ADTtest(L g){ name = g; }//构造方法 @Override public String toString(){ return name....
原创
1257阅读
0评论
0点赞
发布博客于 2 年前

[JAVA]List的remove函数

这个java的list啊,还是挺坑的…他有两个removeE remove(int x);这个是直接删除x位置的元素然后返回他的…boolean remove(Object x);这个是删除list里面的x元素,然后返回是否删除…千万注意如果要使用第一个的时候不要传入了Integer ,不然会当成参数是对象而去执行第二个函数…...
原创
962阅读
0评论
0点赞
发布博客于 2 年前

[HDU2609]How many

Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionGive you n(n&amp;lt;10000)n ( n &amp;lt; 10000)n(n&lt;10000) necklaces ,the length of necklace will...
原创
23阅读
0评论
0点赞
发布博客于 2 年前