自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(41)
  • 资源 (1)
  • 收藏
  • 关注

原创 二分找位置(如果元素不存在)

#include<bits/stdc++.h>using namespace std;int n;int a[110];int mid(int k){ int l,r,mid; l=1; r=n; while(l<=r) { mid=(l+r)/2; if(a[mid]==k) {...

2019-08-23 10:29:30 499

原创 Rescue

题目传送Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison.Angel’s friends wan...

2019-08-22 20:43:30 132

原创 1010同 Tempter of the Bone

题目传送Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. H...

2019-08-22 10:24:33 63

原创 1016同 Prime Ring Problem

题目传送#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=25;int vis[25];int b[N];int ans,n;bool prime(int x){ if(x==0||x==1) return false; else if...

2019-08-21 21:11:34 76

原创 欧拉、埃氏、区间素数筛

1.埃氏素数筛(适用于1e6左右的数据,再大就明显慢了)给你一个数n,让你求从1到n的所有素数。如果n的范围很大,那一个数一个数判断是不是素数一定会超时。素数筛:做一个从2到n的表,先全都标记成是素数。表里最小的数是2, 2是素数,把2的倍数全都划去(都不是素数),下一个最小的数是3,3是素数,把3的倍数也全都划去…表里未被处理的最小的数是m,则m是素数(m没有被划去,说明m没有除了1和m...

2019-08-21 09:06:54 369

原创 I Older Brother

题目传送I Older BrotherYour older brother is an amateur mathematician with lots of experience. However, his memoryis very bad. He recently got interested in linear algebra over finite fields, but he do...

2019-08-20 19:23:42 280

原创 C Brexit

题目传送A long time ago in a galaxy far, far away, there was a large interstellar trading union, consistingof many countries from all across the galaxy. Recently, one of the countries decided to leavet...

2019-08-20 15:37:45 251

原创 C. Almost Equal

C. Almost Equaltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given integer n. You have to arrange numbers from 1 to 2n, using each o...

2019-08-19 19:22:28 281

原创 2015 Syrian Private Universities Collegiate Programming Contest

A题(好吧他加载不出来)B题把给的一个n*m的矩形切成一个个小方格,需要切n*m-1次,切奇数次是先手赢,偶数次先手输。#include <stdio.h>#define ll long longint main(){ int T,a,b; ll z; scanf("%d",&T); while(T--) { ...

2019-08-17 21:19:07 229

原创 优先队列、map函数、pair简单应用

初接触,了解深了再加QWQ一:pairpair是一个有两个元素的结构体,两个元素的类型可以不同。定义:pair <int, string> p1;pair <char,string> p2;pair <string, vector< int> >p3;赋值:pair<int ,string>p1(1,“woshigexi...

2019-08-16 19:58:28 552

原创 D - X and paintings

X is well known artist, no one knows the secrete behind the beautiful paintings of X except his friend Y, well the reason that Y knows X’s secrete is that he is that secret. Y is a programmer and he h...

2019-08-16 19:30:27 367

原创 J - X and Beasts

添加链接描述X is fighting beasts in the forest, in order to have a better chance to survive he’s gonna buy upgrades for his weapon. Weapon upgrade shops are available along the forest, there are n shops, w...

2019-08-16 15:12:28 1113

原创 E. Compress Words

博客 https://blog.csdn.net/weixin_42640692/article/details/99354903https://blog.csdn.net/qq_41117236/article/details/99322891题目http://codeforces.com/contest/1200/problem/Ekmp模板(b在串a中的位置,(如果-1,...

2019-08-15 15:07:01 397

原创 kmp算法再理解

通过移动子串p来寻找p在s串中出现的位置。next[j]用来记录当s[i]和p[j]匹配不成功时,j从next[j]开始重新匹配next数组表示当前字符之前的字符串中,最长相同前后缀长度。kmp算法步骤:当j=-1(p串从头开始匹配)或者s[i]和p[j]匹配时,{ i++; j++; }当j!=-1且s[i]和p[j]不匹配时,{ i不变,j=next[j] } ;表示失配时,p串...

2019-08-15 10:09:08 100

原创 D. White Lines

题目D. White Linestime limit per test1.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGildong has bought a famous painting software cfpaint. The working screen ...

2019-08-14 20:13:36 210

原创 D1. Submarine in the Rybinsk Sea (easy edition)

题目D1. Submarine in the Rybinsk Sea (easy edition)time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis problem differs from the next one only...

2019-08-14 17:04:27 176

原创 C. Basketball Exercise

题目C. Basketball Exercisetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFinally, a basketball court has been opened in SIS, so Demid has dec...

2019-08-14 16:48:59 393

原创 Codeforces Round #578 (Div. 2) B、C

C题C. Round Corridortime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAmugae is in a very large round corridor. The corridor consists of two are...

2019-08-13 16:55:41 163

原创 C - Planet Communcation

Lately the communication between planets has been an important issue, which is why the Earth has made many efforts to be connected to every other planet in the universe.The Universal Network Army of ...

2019-08-13 16:17:47 354

原创 J - Tangram

一块七巧板有 7 块,现在 wls 想再在七巧板上加 nn 条直线将七巧板切分并且使得切出来的块最多,请问最多能有多少块?Input输入有多组(不超过 100, 000组)。每组一行一个正整数 nn。0 ≤ nn ≤ 1, 000, 000, 000Output每组输出一行一个数代表答案。Sample Input1Sample Output13一开始内部5条边相交,跟内部5...

2019-08-08 20:25:16 385

原创 H - Clock

wlswls 有一个钟表,当前钟表指向了某一个时间。又有一些很重要的时刻,wlswls 想要在钟表上复现这些时间(并不需要依次复现)。我们可以顺时针转动秒针,也可以逆时针转动秒针,分针和时针都会随着秒针按规则转动,wlswls 想知道秒针至少转动多少角度可以使每个时刻至少都会被访问一次。注意,时钟上的一种时针分针秒针的组合,可以代表两个不同的时间。Input第一行一个整数 nn 代表有多少...

2019-08-08 20:16:49 818

原创 F - Wormholes

While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a time that i...

2019-08-08 14:24:28 290 2

原创 E - Currency Exchange

Several currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and performs exchange operations only with these currencies. There can...

2019-08-08 11:30:21 194

原创 M - Shuffle'm Up

添加链接描述A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1 and S2, each stack containing C ch...

2019-08-08 09:21:52 77

原创 D. Yet Another Subarray Problem

添加链接描述D. Yet Another Subarray Problemtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a1,a2,…,ana1,a2,…,an and two int...

2019-08-07 20:12:23 355

原创 H - Cow Contest

N (1 ≤ N ≤ 100) cows, conveniently numbered 1…N, are participating in a programming contest. As we all know, some cows code better than others. Each cow has a certain constant skill rating that is uni...

2019-08-07 15:13:41 76

原创 J - Oil Deposits

添加链接描述The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid that div...

2019-08-07 10:20:32 172

原创 E - Prime Path

添加链接描述The ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices.— It is a matter...

2019-08-07 09:49:52 79

原创 C - Third-Party Software

添加链接描述Pavel is developing a game. To do that, he needs functions available in a third-party library too famous to be called. It is known that the function i first appeared in version ai and existed u...

2019-08-06 16:56:14 246

原创 B - Minimal Area Gym - 101755B

添加链接描述You are given a strictly convex polygon. Find the minimal possible area of non-degenerate triangle whose vertices are the vertices of the polygon.InputThe first line contains a single integer...

2019-08-06 16:36:33 135

原创 C - Heavy Transportation

BackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his cust...

2019-08-06 15:40:14 93

原创 B - Frogger

Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on another stone. He plans to visit her, but since the water is dirty and full of tourists’ sun...

2019-08-05 15:53:01 72

原创 A - Til the Cows Come Home

Bessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get b...

2019-08-05 11:08:54 60

原创 E - Tickets

添加链接描述Jesus, what a great movie! Thousands of people are rushing to the cinema. However, this is really a tuff time for Joe who sells the film tickets. He is wandering when could he go back home as e...

2019-08-03 15:52:47 138

原创 1258同 C - Sum It Up HDU

添加链接描述Given a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t=4, n=6, and the list is [4,3,2,2,1,1], then there are ...

2019-08-03 15:17:35 76

原创 C. MP3

添加链接描述outputstandard outputOne common way of digitalizing sound is to record sound intensity at particular time moments. For each time moment intensity is recorded as a non-negative integer. Thus we...

2019-08-02 21:08:59 333

原创 离散化初接触

离散化:不改变数据相对大小的情况下,对数据进行相应的缩小。学术化一点: 把无限空间中有限的个体(有很多重复元素)映射到有限的空间中去,以此提高算法的时空效率。例如 4 3 9 1000000 1000000000可以映射成 2 1 3 4 5利用STL离散化思路是:先排序,再删除重复元素,最后索引元素离散化对应的值。假定...

2019-08-02 20:51:59 102

原创 H - MaratonIME gets candies

添加链接描述Obs: this is an interactive problem. More information is under the “Interaction” section.MaratonIME is gathering to start another group practice. This time, Renzo decided to reward the student...

2019-08-02 14:32:01 148

原创 G - Find a way

Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. Especially a good friend Merceki.Yifenfei’s home is at the cou...

2019-08-01 21:27:55 107

原创 C - Bacteria

添加链接描述Recently Monocarp has created his own mini-laboratory!The laboratory contains $nnn$ bacteria. Monocarp knows that he can merge any two bacteria having equal sizes, and the resulting bacterium ...

2019-08-01 16:21:48 836

项目一:员工管理系统(servlet + 前端)

项目一:员工管理系统(servlet + 前端)

2022-02-21

空空如也

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

TA关注的人

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