2 pengpeng02

尚未进行身份认证

暂无相关简介

等级
TA的排名 15w+

everything原理解释与简单实现。

外面疫情正严重,老师也还没开始上课,我都在家宅了一个多月了。。。实在是闲的无聊。学习?怎么可能,学习是不可能学习的,这辈子都不可能学习的。前几天,在和大佬聊天的时候,偶然听说了一个名叫everything的软件,可以很方便的查询电脑内的文件位置,据说可以秒出结果。只不过只针对NTFS文件系统的盘。在网上查了下,才知道是依赖于NTFS系统自身的特性。everything使用了NTFS文件系统自身...

2020-02-11 17:18:13

mysql查询含转义字符

众所周知,在mysql数据库中‘\'是转义字符,所以在插入和查询时需要处理一下转义字符,插入很好办,把一个替换成两个就好了,但查询呢,稍微有一点点恶心,=查询一换二,like查询一换四。。。比如数据库的字段如下id text01 \abc假如查询id=01的这一行怎么办呢,如果是等于查询,把一个换成两个就好了select * from table where te...

2020-02-11 16:05:27

c++读取UTF8编码文件乱码

我由于需要将某一文件的空行删掉,反正闲着无聊,就准备自己写个代码实现。本来应该就那么几行就可以解决的,结果却发现是乱码。然后,本来几分钟就ok的事,我花了一整个下午的时间才解决。果然写代码才是最好的消磨时间的方法。解决方案一:把要改的文件另存为ANSI编码就不会乱码。解决方案二:string UTF8ToANSI(const char *str){ string res; wc...

2020-01-29 17:38:09

X(1956): 数字和

X(1956): 数字和Time Limit: 1 SecMemory Limit: 128 MbSubmitted: 71Solved: 25Description长者对小明施加了膜法,使得小明每天起床就像马丁的早晨一样。 今天小明早上起来后发现身体虽然变小,头脑依旧不变变傻。他有一条纸带,上面有n个数字,第i个数字为Ai。 他想把纸带...

2018-07-14 13:02:57

csp201912-3 化学方程式 100分

题意很简单,给定一个化学方程式,判断是否已经配平,是则输出“Y”,否则输出“N”。更新:getnum函数的循环在执行前,多加了句清零。就因为少了那句清零,我在90分这里卡了足足两天!!!顺便有个小问题,化学方程式的右括号后面可以不跟数字的吗?就像Na(OH)这样#include <bits/stdc++.h>using namespace std;map<s...

2019-12-17 12:05:33

ioccc代码分析(1)

在四级考试的前一天,咸鱼的我不仅没有学英语,还开始研究起了IOCCC(国际混乱C语言代码大赛)。个人C语言学的也比较渣,在看了这些大神的代码之后,更加感觉自己C语言都学狗身上去了,先看第一个代码:int i;main(){for(;i["]<i;++i){--i;}"];read('-'-'-',i+++"hell\o, world!\n",'/'/'/'));}read(j,i,p...

2019-12-13 20:36:56

E - Text Editor Gym - 101466E

One of the most useful tools nowadays are text editors, their use is so important that the Unique Natural Advanced Language (UNAL) organization has studied many of the benefits working with them.The...

2019-08-15 20:43:35

Vertex Cover

frog has a graph with n vertices v(1),v(2),…,v(n) and m edges (v(a1),v(b1)),(v(a2),v(b2)),…,(v(am),v(bm)).She would like to color some vertices so that each edge has at least one colored vertex....

2019-08-14 16:52:27

Carries

frog has n integers a1,a2,…,an, and she wants to add them pairwise.Unfortunately, frog is somehow afraid of carries (进位). She defines hardness h(x,y)for adding x and y the number of carries invo...

2019-08-14 16:51:10

Censor

frog is now a editor to censor so-called sensitive words (敏感词).She has a long text p. Her job is relatively simple -- just to find the first occurence of sensitive word wand remove it.frog rep...

2019-08-14 15:40:18

hdu 6026 Deleting Edges

Deleting EdgesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2224Accepted Submission(s): 742Problem DescriptionLittle Q is crazy...

2019-08-06 20:27:23

hdu 6570 wave

WaveTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 733Accepted Submission(s): 315Problem DescriptionAvin is studying series. A ser...

2019-08-05 21:00:38

2019 CCPC江西省赛 C HDU 6569 Trap

Avin is studying isosceles trapezoids. An isosceles trapezoid is a convex quadrilateral with two opposite parallel bases, two equal-length legs and positive area. In this problem, we further require t...

2019-08-05 11:28:18

HDU 6567 Cotree(2019CCPC-江西省赛 A)

Problem DescriptionAvin has two trees which are not connected. He asks you to add an edge between them to make them connected while minimizing the function ∑ni=1∑nj=i+1dis(i,j), where dis(i,j) repre...

2019-08-05 11:19:46

2019 第十六届浙江省赛部分题解

A:Vertices in the PocketDreamGrid has just found an undirected simple graph with n vertices and no edges (that's to say, it's a graph with n isolated vertices) in his right pocket, where the vertice...

2019-04-28 19:37:10

黑龙江大学程序设计竞赛(重现赛)

虽然我们是打的团队赛,但我并没有做出什么贡献,貌似本人一个都没过,全程划水。全靠摊了两个好队友才A了七个出来。但赛后发现其实这些题我都是写得出的(除了F那个超时我真的没办法之外)。题目都挺简单的,但我想复杂了Problem AFind the Nth Characterhttps://ac.nowcoder.com/acm/contest/877/A题意:一个如题的字符串,求字符串中...

2019-04-26 19:36:50

c++与批处理结合对文件批量重命名

本人沉迷动漫无法自拔,由于网络问题,我是先下载后再看的。相信不少朋友都遇到过类似的问题,网上下的文件名太长或者没什么用。想重命名,但问题是,如果文件少倒还好,万一文件有几百个,一个个重命名不得累死。如果能写个程序自动进行重命名该多好,这时候我就想到用批处理了。这种事用批处理最方便不过了,遍历文件夹内的文件,然后重命名。可如果要截取的是文件名中间的一部分,用批处理就会很麻烦了。比如下面这种“ひぐらし...

2019-01-09 21:10:59

HDU 1065

I Think I Need a HouseboatTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15316    Accepted Submission(s): 4281 Problem DescriptionFred...

2018-09-23 16:48:52

1901: 赏赐 OR 灾难

1901: 赏赐 OR 灾难     Time Limit: 1 Sec    Memory Limit: 128 Mb    Submitted: 418    Solved: 110    Description大G南征北战终于打下了大片土地成立了G国,大G在开国大典上传召帮助自己南征北战的三大开国元勋小A,小B,小C进殿,并要赏赐三人大量宝物以显示天恩浩荡。大G在征服其他国家的时候...

2018-07-14 14:26:54

I(1005): Binary Search Tree analog

I(1005): Binary Search Tree analog    Time Limit: 1 Sec    Memory Limit: 128 Mb    Submitted: 102    Solved: 57    DescriptionBinary Search Tree, abbreviated as BST, is a kind of binary tree maint...

2018-07-14 13:29:23

查看更多

勋章 我的勋章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv2
    勤写标兵Lv2
    授予每个自然周发布4篇到6篇原创IT博文的用户。本勋章将于次周周三上午根据用户上周的博文发布情况由系统自动颁发。