自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(108)
  • 资源 (2)
  • 收藏
  • 关注

原创 Codeforces Round #529 -C- Powers Of Two(二进制拆分)

A positive integer xx is called a power of two if it can be represented as x=2yx=2y, where yy is a non-negative integer. So, the powers of two are 1,2,4,8,16,…1,2,4,8,16,….You are given two positive...

2018-12-28 16:30:50 801

原创 CodeForces - 581B-Luxurious Houses

The capital of Berland has n multifloor buildings. The architect who built up the capital was very creative, so all the houses were built in one row.Let's enumerate all the houses from left to right...

2018-12-27 20:49:36 297

原创 分配物资(模拟)

链接:https://ac.nowcoder.com/acm/contest/289/E来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述 要将n种物资分配到m个村庄中.村庄按照1,2,3...m编号.已知第i种物资有Ai个.第i个村庄只需某一种物资Bi个....

2018-12-27 17:59:22 972

原创 内心里的一把火(计算几何(海伦公式))

链接:https://ac.nowcoder.com/acm/contest/289/D来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述  小明在上学的路上,看到了小花,小花也看见了他,两个人深情的对视了一下,然后小花就对小明说:你爱过我吗?小明说:爱过。...

2018-12-27 11:44:25 397 2

原创 Codeforces Round #528-A. Right-Left Cipher(字符串模拟)

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp loves ciphers. He has invented his own cipher called Right-Left.Right-Le...

2018-12-24 09:33:50 336

原创 彪神666(暴力即可)

链接:https://ac.nowcoder.com/acm/contest/318/L来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述在国外,666代表魔鬼,777代表上帝。所以牛逼的彪神就非常不喜欢6这个数字。有一天彪神突发奇想,,他想求一些书与6无关...

2018-12-23 17:01:14 364

原创 被打脸的潇洒哥(推递推式)

链接:https://ac.nowcoder.com/acm/contest/318/M来源:牛客网 在一次青青草原ACM个人赛中,潇洒哥被喜洋洋以30s罚时压制,委屈的当了个第二。潇洒哥蹲在角落说出了他的口头禅,并画起了圈圈。     突然,他想出了一个有趣的题目,跑去给喜洋洋做。喜洋洋看到题目后懵逼了,但是看到潇洒哥脸上欠揍的笑容就不爽,暗想一定要做出来狠狠的打潇洒哥的脸。    ...

2018-12-23 16:59:01 426

原创 送气球.jpg(模拟)

链接:https://ac.nowcoder.com/acm/contest/318/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述       ACM-ICPC程序设计大赛是大学级别最高的脑力竞赛,素来被冠以"程序设计的奥林匹克"的尊称。大赛至今已有近40年...

2018-12-23 16:53:01 340

原创 赌神(逆向思维)

链接:https://ac.nowcoder.com/acm/contest/321/D来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述买定离手,买定离手!到底谁能捧杯本次新生赛?大家好,欢迎来到由“亿电竞”赞助的“一元搏天下”活动。亿电竞的投资人“亿大佬”向...

2018-12-22 16:29:46 1112

原创 抢课啦!(排序)

链接:https://ac.nowcoder.com/acm/contest/321/B来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述没有选上课的孩子,或者还有?”“救救孩子……”__________________________又又又到了选修课抢课的时间...

2018-12-22 16:10:27 800 2

原创 蓝桥校内选拔赛B题(不一定正确)

由于没报名,只能靠别人发的截图来做了我的思路:全排列,判断加号位置,判断/位置,看是否存在这个相等的时间复杂度较高,在10e8左右代码:#include<cstdio>#include<algorithm>#include<cstring>#include<iostream>#include<c...

2018-12-22 15:55:04 320

原创 ICPC-无限路之城(数学+思维)

链接:https://ac.nowcoder.com/acm/contest/321/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 131072K,其他语言262144K64bit IO Format: %lld题目描述集训队里,有一位是城市与环境规划学院出身的队员7373!某一天7373在坐地铁时,对城市的公共交通规划产生了兴趣.他知道...

2018-12-22 15:23:29 409 2

原创 1e9个兵临城下(容斥原理)

链接:https://ac.nowcoder.com/acm/contest/321/A来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述 “FF来训练!”“一定来!”  FF成天到晚咕了NE的训练。这可把NE急坏了。为了拯救ff的知识勺,拥有知识海的N...

2018-12-22 15:17:28 464

原创 CodeForces - 508B-Anton and currency you all know

Berland, 2016. The exchange rate of currency you all know against the burle has increased so much that to simplify the calculations, its fractional part was neglected and the exchange rate is now assu...

2018-12-22 00:15:07 247

原创 CodeForces - 507B - Amr and Pins(计算几何)

Amr loves Geometry. One day he came up with a very interesting problem.Amr has a circle of radius r and center in point (x, y). He wants the circle center to be in new position (x', y').In one ste...

2018-12-21 23:05:18 248

原创 CodeForces - 361A-Levko and Table (思维)

Levko loves tables that consist of n rows and n columns very much. He especially loves beautiful tables. A table is beautiful to Levko if the sum of elements in each row and column of the table equals...

2018-12-21 17:52:22 255

原创 CodeForces - 894A-QAQ(思维)

"QAQ" is a word to denote an expression of crying. Imagine "Q" as eyes with tears and "A" as a mouth.Now Diamond has given Bort a string consisting of only uppercase English letters of length n. The...

2018-12-21 17:25:20 316

原创 7-36 旅游规划 (25 分(Dijkstra)

有了一张自驾旅游路线图,你会知道城市间的高速公路长度、以及该公路要收取的过路费。现在需要你写一个程序,帮助前来咨询的游客找一条出发地和目的地之间的最短路径。如果有若干条路径都是最短的,那么需要输出最便宜的一条路径。输入格式:输入说明:输入数据的第1行给出4个正整数N、M、S、D,其中N(2≤N≤500)是城市的个数,顺便假设城市的编号为0~(N−1);M是高速公路的条数;S是出发地的城市编...

2018-12-20 16:45:01 2061

原创 CodeForces - 287B-Pipeline(二分)

Vova, the Ultimate Thule new shaman, wants to build a pipeline. As there are exactly n houses in Ultimate Thule, Vova wants the city to have exactly n pipes, each such pipe should be connected to the ...

2018-12-20 16:23:57 384

原创 CodeForces - 500A-New Year Transportation(模拟)

New Year is coming in Line World! In this world, there are n cells numbered by integers from 1 to n, as a 1 × n board. People live in cells. However, it was hard to move between distinct cells, becaus...

2018-12-20 15:56:19 287

原创 CodeForces - 296A-Yaroslav and Permutations(思维)

Yaroslav has an array that consists of n integers. In one second Yaroslav can swap two neighboring array elements. Now Yaroslav is wondering if he can obtain an array where any two neighboring element...

2018-12-20 15:13:48 331

原创 How far away(DFS+vector存图)

There are n houses in the village and some bidirectional roads connecting them. Every day peole always like to ask like this "How far is it if I want to go from house A to house B"? Usually it hard to...

2018-12-20 13:58:26 248

原创 A Simple Math Problem (矩阵快速幂)

Lele now is thinking about a simple function f(x). If x < 10 f(x) = x. If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10); And ai(0<=i<=9) can only be 0 or 1 ...

2018-12-19 23:19:17 251

原创 1060 爱丁顿数 (25 分)(思维)

英国天文学家爱丁顿很喜欢骑车。据说他为了炫耀自己的骑车功力,还定义了一个“爱丁顿数” E ,即满足有 E 天骑车超过 E 英里的最大整数 E。据说爱丁顿自己的 E 等于87。现给定某人 N 天的骑车距离,请你算出对应的爱丁顿数 E(≤N)。输入格式:输入第一行给出一个正整数 N (≤10​5​​),即连续骑车的天数;第二行给出 N 个非负整数,代表每天的骑车距离。输出格式:在一...

2018-12-19 17:00:54 252

原创 Codeforces Round #527-D1. Great Vova Wall (Version 1)(思维+栈)

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVova's family is building the Great Vova Wall (named by Vova himself). Vova's pare...

2018-12-19 16:31:36 685 2

原创 Codeforces Round #527-B. Teams Forming(贪心)

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are nn students in a university. The number of students is even. The ii-th st...

2018-12-19 16:10:49 446

原创 Codeforces Round #527 -A. Uniform String(思维)

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given two integers n and k.Your task is to construct such a string ss of ...

2018-12-19 16:06:50 458

原创 CodeForces - 796B-Find The Bone(模拟)

Zane the wizard is going to perform a magic show shuffling the cups.There are n cups, numbered from 1 to n, placed along the x-axis on a table that has m holes on it. More precisely, cup i is on the...

2018-12-18 11:09:30 276

原创 CodeForces - 851B -Arpa and an exam about geometry(计算几何)

Arpa is taking a geometry exam. Here is the last problem of the exam.You are given three points a, b, c.Find a point and an angle such that if we rotate the page around the point by the angle, the...

2018-12-18 09:54:46 300

原创 CodeForces - 608A-Saitama Destroys Hotel(模拟)

Saitama accidentally destroyed a hotel again. To repay the hotel company, Genos has volunteered to operate an elevator in one of its other hotels. The elevator is special — it starts on the top floor,...

2018-12-18 09:13:51 336

原创 CodeForces - 1005A-Tanya and Stairways(模拟)

Little girl Tanya climbs the stairs inside a multi-storey building. Every time Tanya climbs a stairway, she starts counting steps from 11 to the number of steps in this stairway. She speaks every numb...

2018-12-17 23:34:30 217

原创 米勒罗宾素性测试算法简介+模板(转)

看了一些别人的博客,发现里面涉及到的公式没有证明,于是就打算自己写一篇比较详细的讲解。先看两个引理及其证明(建议把证明搞懂)。PS:以下图片均为原作者用wps制作,如想使用请附上作者博客链接,谢谢O(∩_∩)O。 看完了上面的引理,那就可以正式开始Miller-Rabin算法的讲解了。背景:素性测试(即测试给定的数是否为素数)是近代密码学中的一个非常重要的课题。虽然Wi...

2018-12-17 21:54:18 3218 1

原创 CodeForces - 1004A-Sonya and Hotels(思维)

Sonya decided that having her own hotel business is the best way of earning money because she can profit and rest wherever she wants.The country where Sonya lives is an endless line. There is a city...

2018-12-17 21:38:51 286

原创 CodeForces - 1003-B-Binary String Constructing (规律+模拟)

You are given three integers aa, bb and xx. Your task is to construct a binary string ssof length n=a+bn=a+b such that there are exactly aa zeroes, exactly bb ones and exactly xx indices ii (where 1≤i...

2018-12-17 21:02:35 384

原创 Avito Cool Challenge 2018-B. Farewell Party(思维)

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputChouti and his classmates are going to the university soon. To say goodbye to each ...

2018-12-17 09:44:16 464

原创 Avito Cool Challenge 2018-A. Definite Game(思维题)

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputChouti was doing a competitive programming competition. However, after having all t...

2018-12-17 09:40:20 461

原创 Codeforces Round 56-C. Mishka and the Last Exam(思维+贪心)

time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMishka is trying really hard to avoid being kicked out of the university. In parti...

2018-12-16 17:09:20 451

原创 Codeforces Round 56-B. Letters Rearranging(思维)

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string ss consisting only of lowercase Latin letters.You can rear...

2018-12-16 00:51:47 358

原创 Codeforces Round 56-A. Dice Rolling(思维题)

time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMishka got a six-faced dice. It has integer numbers from 22 to 77 written on its fa...

2018-12-16 00:49:22 394 2

原创 CodeForces - 603A-Alternative Thinking (思维题)

Kevin has just recevied his disappointing results on the USA Identification of Cows Olympiad (USAICO) in the form of a binary string of length n. Each character of Kevin's string represents Kevin's sc...

2018-12-15 16:36:14 305

个人自用对拍CPP程序 增加了颜色和错误样例显示

c++对拍程序,找bug神器,能够很好的反应代码的错误样例 加速你的找bug效率,助你走向人生巅峰,能够快速定位错误,让你的bug无处遁形

2020-10-03

抖音表白软件

一个简单的抖音之前火的软件

2018-10-02

空空如也

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

TA关注的人

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