自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

代码笔记本

个人博客www.yyycode.cn

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

原创 EDUCATIONAL CODEFORCES ROUND 88 (RATED FOR DIV. 2)

http://www.yyycode.cn/index.php/2020/05/30/educational-codeforces-round-88-rated-for-div-2/A. BERLAND POKERB. NEW THEATRE SQUAREC. MIXING WATERD. YET ANOTHER YET ANOTHER TASK【枚举的转化+区间最大连续子段和】

2020-05-30 21:52:44 167

原创 C. MIXING WATER

http://www.yyycode.cn/index.php/2020/05/30/c-mixing-water/There are two infinite sources of water:hot water of temperaturehh; cold water of temperaturecc(c<hc<h).You perform the following procedure of alternating moves:takeonecup of t...

2020-05-30 21:50:45 360 1

原创 B. NEW THEATRE SQUARE

http://www.yyycode.cn/index.php/2020/05/30/b-new-theatre-square/ou might have remembered Theatre square from theproblem 1A. Now it’s finally getting repaved.The square still has a rectangular shape ofn×mn×mmeters. However, the picture is about to ge...

2020-05-30 21:40:41 302

原创 A. BERLAND POKER

http://www.yyycode.cn/index.php/2020/05/30/a-berland-poker/The game of Berland poker is played with a deck ofnncards,mmof which are jokers.kkplayers play this game (nnis divisible bykk).At the beginning of the game, each player takesnknkca...

2020-05-30 21:36:28 227

原创 D. YET ANOTHER YET ANOTHER TASK【枚举的转化+区间最大连续子段和】

http://www.yyycode.cn/index.php/2020/05/30/d-yet-another-yet-another-task%e3%80%90%e6%9e%9a%e4%b8%be%e7%9a%84%e8%bd%ac%e5%8c%96%e5%8c%ba%e9%97%b4%e6%9c%80%e5%a4%a7%e8%bf%9e%e7%bb%ad%e5%ad%90%e6%ae%b5%e5%92%8c%e3%80%91/Alice and Bob are playing yet ano.

2020-05-30 21:23:33 1222

原创 CODEFORCES ROUND #645 (DIV. 2)

http://www.yyycode.cn/index.php/2020/05/30/codeforces-round-645-div-2/A. Park Lightingtimelimit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDue to the coronavirus pandemic, city authorities obligated .

2020-05-30 20:32:10 433

原创 西安邮电大学第五届ACM-ICPC校赛(同步赛)

http://www.yyycode.cn/index.php/2020/05/30/%e8%a5%bf%e5%ae%89%e9%82%ae%e7%94%b5%e5%a4%a7%e5%ad%a6%e7%ac%ac%e4%ba%94%e5%b1%8aacm-icpc%e6%a0%a1%e8%b5%9b%ef%bc%88%e5%90%8c%e6%ad%a5%e8%b5%9b%ef%bc%89/https://ac.nowcoder.com/acm/contest/5678A、拯救咕咕咕之史莱姆链接:

2020-05-30 19:02:45 3657

原创 Problem B: 深入浅出学算法003-计算复杂度

Problem B: 深入浅出学算法003-计算复杂度Time Limit:1 SecMemory Limit:64 MBSubmit:2826Solved:1165Description算法复杂度一般分为:时间复杂度、空间复杂度、编程复杂度。 这三个复杂度本身是矛盾体,不能一味地追求降低某一复杂度,否则会带来其他复杂度的增加。在权衡各方面的情况下,降低时间复杂度成为本课程学习的重点之一。 请计算下面几个程序段的复杂程度,分别用1、logn、n、nlogn、n^2、n^3或2^...

2020-05-29 16:00:21 754

原创 1308: 深入浅出学算法003-n个1

题目描述由n个1组成的整数能被K(K<10000)整除,n至少为多少?输入多组测试数据,第一行输入整数T,表示组数 然后是T行,每行输入1个整数代表K(K保证是奇数)输出对于每组测试数据输出1行,值为n样例输入111样例输出2#include<stdio.h>#include<math.h>int main(void){ int a,k,t,count; while(scanf("%d",&amp...

2020-05-29 15:57:15 1421

原创 GETLINE文件读取LONG LONG 出问题的原因

http://www.yyycode.cn/index.php/2020/05/28/getline%e6%96%87%e4%bb%b6%e8%af%bb%e5%8f%96long-long-%e5%87%ba%e9%97%ae%e9%a2%98%e7%9a%84%e5%8e%9f%e5%9b%a0/这里的intstr1读出来和str是不一样的。我的oppophone定义的是longlong类型。估计是超了atoi的函数之类的。用atoi来将字符串转换为int类型。例如atoi(“123

2020-05-28 14:26:08 219

原创 引发了异常: 读取访问权限冲突。 P 是 0XCCCCCCCC。

http://www.yyycode.cn/index.php/2020/05/27/%e5%bc%95%e5%8f%91%e4%ba%86%e5%bc%82%e5%b8%b8-%e8%af%bb%e5%8f%96%e8%ae%bf%e9%97%ae%e6%9d%83%e9%99%90%e5%86%b2%e7%aa%81%e3%80%82-p-%e6%98%af-0xcccccccc%e3%80%82/把链表定义里面的 Sturuct *next=nullptr;防止遍历的时候跳出的指针的next不

2020-05-27 21:49:15 1724

原创 C2360XXX初始化被CASE的标签跳过

http://www.yyycode.cn/index.php/2020/05/27/c2360xxx%e5%88%9d%e5%a7%8b%e5%8c%96%e8%a2%abcase%e7%9a%84%e6%a0%87%e7%ad%be%e8%b7%b3%e8%bf%87/case 1: { int n = -1; n = s.login(); if (n == -1) break;

2020-05-27 18:49:02 271 1

原创 十六进制转十进制

#include<iostream>#include<vector>#include<queue>#include<cstring>#include<algorithm>using namespace std;const int maxn=1e5;typedef long long LL;int main(void){ string str;cin>>str; LL sum=0; for(LL i=0;i&l.

2020-05-26 19:09:19 785

原创 从实验1到课设的中自己的小理解(待更新)

http://www.yyycode.cn/index.php/2020/05/26/%e4%bb%8e%e5%ae%9e%e9%aa%8c1%e5%88%b0%e8%af%be%e8%ae%be%e7%9a%84%e4%b8%ad%e8%87%aa%e5%b7%b1%e7%9a%84%e5%b0%8f%e7%90%86%e8%a7%a3%e5%be%85%e6%9b%b4%e6%96%b0/实验1要求:使用类和对象开发一个可以对单个学生的课程进行管理的项目。可以增加备选课程,学生可以选择所修.

2020-05-26 00:13:43 353

原创 第十五届中北大学算法与程序设计竞赛(公开赛)

http://www.yyycode.cn/index.php/2020/05/24/%e7%ac%ac%e5%8d%81%e4%ba%94%e5%b1%8a%e4%b8%ad%e5%8c%97%e5%a4%a7%e5%ad%a6%e7%ae%97%e6%b3%95%e4%b8%8e%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e7%ab%9e%e8%b5%9b%ef%bc%88%e5%85%ac%e5%bc%80%e8%b5%9b%ef%bc%89/俄罗斯方块链接.

2020-05-24 17:02:22 1265

原创 调和级数近似求和公式推导(转载)

原文链接:https://blog.csdn.net/ezoiHQM/article/details/82961266?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase.

2020-05-24 11:16:48 3151

原创 DIV. 2 B — T-PRIMES

http://www.yyycode.cn/index.php/2020/05/23/div-2-b-t-primes/We know that prime numbers are positive integers that have exactly two distinct positive divisors. Similarly, we’ll call a positive integertТ-prime, ifthas exactly three distinct positive...

2020-05-23 13:04:38 590 4

原创 A. CUT RIBBON(暴力枚举或者完全背包)

http://www.yyycode.cn/index.php/2020/05/23/a-cut-ribbon/https://codeforces.com/problemset/problem/189/APolycarpus has a ribbon, its length isn. He wants to cut the ribbon in a way that fulfils the following two conditions:After the cutting each ribb.

2020-05-23 09:43:57 1129 2

原创 C. ALICE, BOB AND CHOCOLATE

http://www.yyycode.cn/index.php/2020/05/20/c-alice-bob-and-chocolate/Alice and Bob like games. And now they are ready to start a new game. They have placednchocolate bars in a line. Alice starts to eat chocolate bars one by one from left to right, a...

2020-05-20 20:51:38 390

原创 RABBIT的工作(1)

http://www.yyycode.cn/index.php/2020/05/20/rabbit%e7%9a%84%e5%b7%a5%e4%bd%9c1/RABBIT的工作(1) 发表于:2020年5月20日 分类:Dp,线性Dp 编辑1 次浏览 链接:https://ac.nowcoder.com/acm/contest/5713/C来源:牛客网题目描述Rabbit大学毕业后找到了一份实习工作,如果实习通过她就转正了。实...

2020-05-20 20:43:42 213

原创 A. KIRILL AND THE GAME

http://www.yyycode.cn/index.php/2020/05/20/a-kirill-and-the-game/Kirill plays a new computer game. He came to the potion store where he can buy any potion. Each potion is characterized by two integers— amount of experience and cost. The efficiency of a .

2020-05-20 17:34:15 184

原创 B. LECTURE SLEEP

http://www.yyycode.cn/index.php/2020/05/20/b-lecture-sleep/Your friend Mishka and you attend a calculus lecture. Lecture lastsnminutes. Lecturer tellsaitheorems during thei-th minute.Mishka is really interested in calculus, though it is so har...

2020-05-20 16:26:33 257

原创 牛客算法周周练7

http://www.yyycode.cn/index.php/2020/05/19/%e7%89%9b%e5%ae%a2%e7%ae%97%e6%b3%95%e5%91%a8%e5%91%a8%e7%bb%837/收集纸片链接:https://ac.nowcoder.com/acm/contest/5713/A来源:牛客网我们把房间按照笛卡尔坐标系进行建模之后,每个点就有了一个坐标。 假设现在房子里有些纸片需要被收集,收集完纸片你还要回归到原来的位置,你需要制定一个策略来使得自己行走的.

2020-05-19 21:48:51 229

原创 C. BALANCED TEAM[双头指针]

http://www.yyycode.cn/index.php/2020/05/19/c-balanced-team%e5%8f%8c%e5%a4%b4%e6%8c%87%e9%92%88/https://codeforces.com/problemset/problem/1133/CYou are a coach at your local university. There arennstudents under your supervision, the programming skill..

2020-05-19 16:26:39 234

原创 C. DOMINATED SUBARRAY[求最短的两个相同的数的子串长度]

http://www.yyycode.cn/index.php/2020/05/19/c-dominated-subarray%e6%b1%82%e6%9c%80%e7%9f%ad%e7%9a%84%e4%b8%a4%e4%b8%aa%e7%9b%b8%e5%90%8c%e7%9a%84%e6%95%b0%e7%9a%84%e5%ad%90%e4%b8%b2%e9%95%bf%e5%ba%a6/https://codeforces.com/problemset/problem/1257/C..

2020-05-19 09:29:09 217

原创 C. THREE PARTS OF THE ARRAY【双头指针+前缀和】

http://www.yyycode.cn/index.php/2020/05/18/c-three-parts-of-the-array%e3%80%90%e5%8f%8c%e5%a4%b4%e6%8c%87%e9%92%88%e5%89%8d%e7%bc%80%e5%92%8c%e3%80%91/You are given an arrayd1,d2,…,dnd1,d2,…,dnconsisting ofnninteger numbers.Your task is to split th...

2020-05-18 22:10:51 258 1

原创 B. BERSU BALL(双指针)

http://www.yyycode.cn/index.php/2020/05/18/b-bersu-ball/The Berland State University is hosting a ballroom dance in celebration of its 100500-th anniversary!nboys andmgirls are already busy rehearsing waltz, minuet, polonaise and quadrille moves.We...

2020-05-18 21:14:30 474

原创 C. COUNT TRIANGLES(枚举优化——不等式和的枚举)【不详细你砍我好了5555

http://www.yyycode.cn/index.php/2020/05/18/c-count-triangles%e6%9e%9a%e4%b8%be%e4%bc%98%e5%8c%96-%e4%b8%8d%e7%ad%89%e5%bc%8f%e5%92%8c%e7%9a%84%e6%9e%9a%e4%b8%be/图片转存失败,不能看的话来我博客Like any unknown mathematician, Yuri has favourite numbers:AA,BB,C...

2020-05-18 17:47:22 441

原创 C. PRODUCT OF THREE NUMBERS[等式枚举优化]

http://www.yyycode.cn/index.php/2020/05/17/c-product-of-three-numbers%e7%ad%89%e5%bc%8f%e6%9e%9a%e4%b8%be%e4%bc%98%e5%8c%96/You are given one integer numbernn. Find threedistinct integersa,b,ca,b,csuch that2≤a,b,c2≤a,b,canda⋅b⋅c=na⋅b⋅c=nor say th...

2020-05-17 22:32:33 291

原创 B. VANYA AND LANTERNS

http://www.yyycode.cn/index.php/2020/05/17/b-vanya-and-lanterns/anya walks late at night along a straight street of lengthl, lit bynlanterns. Consider the coordinate system with the beginning of the street corresponding to the point0, and its end cor...

2020-05-17 21:10:09 341

原创 B. TERNARY STRING

http://www.yyycode.cn/index.php/2020/05/17/b-ternary-string/You are given a stringsssuch that each its character is either1,2, or3. You have to choose the shortest contiguous substring ofsssuch that it contains each of these three characters at le...

2020-05-17 20:34:08 593

原创 CODEFORCES ROUND #643 (DIV. 2)

http://www.yyycode.cn/index.php/2020/05/17/codeforces-round-643-div-2/A. Sequence with DigitsLet’s define the following recurrence:an+1=an+minDigit(an)⋅maxDigit(an).an+1=an+minDigit(an)⋅maxDigit(an).HereminDigit(x)minDigit(x)andmaxDigit(x)maxDigit...

2020-05-17 20:19:52 348

原创 CODEFORCES ROUND #641 (DIV. 2)【A-C】

http://www.yyycode.cn/index.php/2020/05/16/codeforces-round-641-div-2%e3%80%90a-c%e3%80%91/如果图片看不到来我博客看叭A. Orac and Factorshttps://codeforces.com/contest/1350/problem/AOrac is studying number theory, and he is interested in the properties of diviso

2020-05-16 23:30:34 264

原创 “科大讯飞杯”第十七届同济大学程序设计预选赛暨高校网络友谊赛 A-张老师和菜哭武的游戏(GCD)

http://www.yyycode.cn/index.php/2020/05/16/%e7%a7%91%e5%a4%a7%e8%ae%af%e9%a3%9e%e6%9d%af%e7%ac%ac%e5%8d%81%e4%b8%83%e5%b1%8a%e5%90%8c%e6%b5%8e%e5%a4%a7%e5%ad%a6%e7%a8%8b%e5%ba%8f%e8%ae%be%e8%ae%a1%e9%a2%84%e9%80%89%e8%b5%9b/思路:观察到开始的时候在1-n中选p,这个p是.

2020-05-16 17:25:30 7568

原创 CODEFORCES ROUND #642 (DIV. 3)[蒟蒻讲解]

http://www.yyycode.cn/index.php/2020/05/16/codeforces-round-642-div-3/A. Most Unstable ArrayYou are given two integersnnandmm. You have to construct the arrayaaof lengthnnconsisting ofnon-negative integers(i.e. integers greater than or equal t...

2020-05-16 16:22:37 549

原创 问题 A: 赌徒(折半枚举查找)

http://www.yyycode.cn/index.php/2020/05/16/%e9%97%ae%e9%a2%98-a-%e8%b5%8c%e5%be%92%e6%8a%98%e5%8d%8a%e6%9e%9a%e4%b8%be%e6%9f%a5%e6%89%be/题目描述有n个赌徒打算赌一局。规则是:每人下一个赌注,赌注为非负整数,且任意两个赌注都不相同。胜者为赌注恰好是其余任意三个人的赌注之和的那个人。如果有多个胜者,我们取赌注最大的那个为最终胜者。例如,A,B,C,D,E分别下赌注

2020-05-16 14:16:34 570

原创 错误C3867

错误 C3867 “Teacher2::backname”: 非标准语法;请使用 “&” 来创建指向成员的指针改成:(*everyteacher[i]).backname == username) [我的数组里存的是对象的指针] —用对象去调用对象的函数报错:(everyteacher[i]->backname==username);【用对象的指针去调用对象的函数】http://www.yyycode.cn/index.php/2020/05/15/%e9%94%99%e8%a.

2020-05-15 19:48:04 1032

原创 类的思考和自己掉的坑

只有本身类的成员函数才可以访问 private 类型 类的对象若在其他函数中是不可以访问类的 protectprivate类型变量类其实是个模型。而对象就是找个这个模型制作的实体。所以在写类的时候可以想象在写一个对象有什么东西类的成员是分级别的:protect,public,private。在类内部定义的函数可以访问任何一个变量,或者调用任何的类内部的函数。但是,如果被定义成private的话,对象是不能调用的,也就是对象只能调用定义为public的数据,如果你确实需要调用某个privat..

2020-05-15 19:42:53 119

原创 C++中报错: E0289:没有与参数列表匹配的构造函数

http://www.yyycode.cn/index.php/2020/05/15/c%e4%b8%ad%e6%8a%a5%e9%94%99%ef%bc%9a-e0289%ef%bc%9a%e6%b2%a1%e6%9c%89%e4%b8%8e%e5%8f%82%e6%95%b0%e5%88%97%e8%a1%a8%e5%8c%b9%e9%85%8d%e7%9a%84%e6%9e%84%e9%80%a0%e5%87%bd%e6%95%b0/把string的多个改成多个 { }写就行了…(版本:.

2020-05-15 15:37:35 3470 1

原创 C2504以及派生类中无法继承基类成员变量的问题

http://www.yyycode.cn/index.php/2020/05/15/c2504%e4%bb%a5%e5%8f%8a%e6%b4%be%e7%94%9f%e7%b1%bb%e4%b8%ad%e6%97%a0%e6%b3%95%e7%bb%a7%e6%89%bf%e5%9f%ba%e7%b1%bb%e6%88%90%e5%91%98%e5%8f%98%e9%87%8f%e7%9a%84%e9%97%ae%e9%a2%98/ 更好的阅读体验记录一下一个蒟蒻初学者犯的错误要从派生类中访..

2020-05-15 11:38:09 407

空空如也

空空如也

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

TA关注的人

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