- 博客(37)
- 资源 (21)
- 论坛 (5)
- 收藏
- 关注
原创 【Codeforces 1454 E】Number of Simple Paths,基环树,拓扑排序找环,dfs统计节点数
problemE. Number of Simple Pathstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an undirected graph consisting of n vertices and n edges. It is guaranteed that the given graph is con
2021-02-25 13:52:52
34
原创 【Codeforces 1451 E1】Bitwise Queries (Easy Version),交互题,位运算,猜数组
problemE1. Bitwise Queries (Easy Version)time limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe only difference between the easy and hard versions is the constraints on the number of queries.This is
2021-02-25 13:16:40
26
原创 【Codeforces 1438 C】Engineer Artem,矩阵,奇偶性构造
problemC. Engineer Artemtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArtem is building a new robot. He has a matrix a consisting of n rows and m columns. The cell located on the i-th row from th
2021-02-25 11:50:33
35
原创 【Codeforces 1426 F】Number of Subsequences,字符串计数DP
problemF. Number of Subsequencestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s consisting of lowercase Latin letters “a”, “b” and “c” and question marks “?”.Let the numbe
2021-02-25 11:29:40
28
原创 2021牛客寒假算法基础集训营6,签到题ACDFGIJ
A 回文括号序列计数,找规律#include<bits/stdc++.h>using namespace std;typedef long long LL;const int maxn = 1e6+10;const int mod = 998244353;int main(){ ios::sync_with_stdio(false); int T; cin>>T; while(T--){ LL n; cin>>n; if(n==0){c
2021-02-24 19:11:47
56
原创 【Codeforces 1436 D】Bandit in a City,贪心,DFS,多叉树
problemD. Bandit in a Citytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBandits appeared in the city! One of them is trying to catch as many citizens as he can.The city consists of n squares con
2021-02-24 10:54:09
46
原创 【Codeforces 1421 D】Hexagons,贪心,模拟
problemD. Hexagonstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLindsey Buckingham told Stevie Nicks “Go your own way”. Nicks is now sad and wants to go away as quickly as possible, but she live
2021-02-22 20:20:24
28
原创 【Codeforces 1462 F】The Treasure of The Segments,贪心,二分,排序
problemF. The Treasure of The Segmentstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp found n segments on the street. A segment with the index i is described by two integers li and ri — c
2021-02-22 19:56:07
21
原创 【Codeforces 1426 E】Rock, Paper, Scissors,贪心!算反面
problemE. Rock, Paper, Scissorstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice and Bob have decided to play the game “Rock, Paper, Scissors”.The game consists of several rounds, each round i
2021-02-22 19:29:52
35
原创 2021牛客寒假算法基础集训营5,签到题BF
B 比武招亲(上)/**/#include<bits/stdc++.h>using namespace std;typedef long long LL;const int maxn = 1e6+10;const int mod = 998244353;LL fac[maxn], inv[maxn];LL mpow(LL a, LL x) { if(x==0)return 1; LL t = mpow(a, x>>1); if(x%2==0)return
2021-02-22 19:04:47
46
原创 【Codeforces 1420 D】Rescue Nibel!,卢卡斯组合数,排序,枚举贡献
problemD. Rescue Nibel!time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOri and Sein have overcome many difficult challenges. They finally lit the Shrouded Lantern and found Gumon Seal, the key to
2021-02-21 22:09:42
31
原创 【Codeforces 1474 C】Array Destruction,枚举,multiset模拟
problemC. Array Destructiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou found a useless array a of 2n positive integers. You have realized that you actually don’t need this array, so you dec
2021-02-21 20:57:33
22
原创 【Codeforces 1472 E】Correct Placement,结构排序,二分搜索
problemE. Correct Placementtime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp has invited n friends to celebrate the New Year. During the celebration, he decided to take a group photo of all
2021-02-21 18:00:26
29
原创 【Codeforces 1451 D】Circle Game,博弈论,游戏题
problemD. Circle Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputUtkarsh is forced to play yet another one of Ashish’s games. The game progresses turn by turn and as usual, Ashish moves first.
2021-02-21 16:21:43
61
原创 【Codeforces 1422 C】Bargain,dp方案书,组合分类计算贡献
problemC. Bargaintime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSometimes it is not easy to come to an agreement in a bargain. Right now Sasha and Vova can’t come to an agreement: Sasha names a pr
2021-02-21 16:06:14
33
1
原创 【Codeforces 1461 D】Divide and Summarize,二分,分治,贪心
problemD. Divide and Summarizetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike received an array a of length n as a birthday present and decided to test how pretty it is.An array would pass t
2021-02-21 15:31:16
38
原创 C++STL查找,lower_bound()函数和upper_bound()函数的区别
lower_bound:>=lower_bound:返回第一个大于等于x的位置//找数组中的第一个5(数组中接近x的元素可以比较d和d-1)int N = 10, a[] = {1, 1, 2, 4, 5, 5, 7, 7, 9, 9}, x = 5;int d = lower_bound(a, a + N, x) - a;//d=5upper_bound:>upper_bound:返回第一个大于x的位置//找数组中的第一个7int N = 10, a[] = {1, 1,
2021-02-21 14:38:47
42
原创 2021牛客寒假算法基础集训营4,签到题AGJ
A. 九峰与签到题#include<bits/stdc++.h>using namespace std;typedef long long LL;struct node{int ac=0, unac=0;}a[50];int vis[50];int main(){ int m, n; cin>>m>>n; for(int i = 1; i <= m; i++){ int x; string op; cin>>x>>o
2021-02-19 18:46:17
1086
4
原创 【Codeforces 1462 E2】Close Tuples (hard version),排序,二分,贪心,组合数
problemE2. Close Tuples (hard version)time limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is the hard version of this problem. The only difference between the easy and hard versions is the constr
2021-02-15 16:28:49
33
原创 【Codeforces 1462 E1】Close Tuples (easy version),排序,二分,贪心,组合数
problemE1. Close Tuples (easy version)time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is the easy version of this problem. The only difference between easy and hard versions is the constraint
2021-02-15 16:26:30
32
原创 【Codeforces 1461 C】Random Events,贪心,概率统计
problemC. Random Eventstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRon is a happy owner of a permutation a of length n.A permutation of length n is an array consisting of n distinct integers
2021-02-15 15:44:40
22
原创 【Codeforces 1436 C】Binary Search,二分,构造排列,统计
problemC. Binary Searchtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrey thinks he is truly a successful developer, but in reality he didn’t know about the binary search algorithm until recent
2021-02-15 15:21:27
34
原创 BT种子/磁力/eD2K,P2P和各种下载协议
1、HTTP / HTTPS将文件放到服务器上,然后由服务器传送到不同的用户机器上,称为Client-Server Model简称C/S模式,或者叫一对多模式。这种协议的缺点是:因为服务器的上传速度有限,如果同一时刻下载同一文件的用户太多,会影响到下载速度2、FTP / SFTPFTP跟HTTP一样,也是将文件放到服务器上,区别在于它需要密码验证3、BT种子 / 磁力链接问:什么是P2P(Peer-to-Peer)?答:性质如下:它是无中心服务器的对等网络系统,而上文说的C/S模式是有
2021-02-14 16:17:59
453
原创 2021牛客寒假算法基础集训营3,签到题DGHIJ
D. Happy New Year!模拟#include<bits/stdc++.h>using namespace std;int main(){ ios::sync_with_stdio(false); int n; cin>>n; int nn = n, ss = 0; while(nn>0){ss+=nn%10; nn/=10;} for(int i = n+1; i <= 9999; i++){ int t = i, sum = 0;
2021-02-05 20:11:14
47
原创 2021牛客寒假算法基础集训营2,签到题FHIJ
F 牛牛与交换排序//题目的限制条件是每次选翻转的区间只能更靠右,所以不能用长度为2的区间翻转两次达到把x翻到后面。所以确定k的方法是从左到右找到第一个顺序不对的数字,然后看它的位置和现在位置的距离,因为它一定是由一个这么大的区间翻过来的。//接下来就按照给定的k去翻,直到不成立为止#include<bits/stdc++.h>using namespace std;const int maxn = 100010;int n, a[maxn], pos[maxn];int mai
2021-02-04 19:41:20
42
原创 C++STL优先队列小根堆大根堆自定义的应用
小根堆 greater#include<iostream>#include<queue>using namespace std;priority_queue<int, vector<int>, greater<int> >q;int main(){ q.push(1); q.push(2); cout<<q.top(); return 0;}大根堆 less#include<iostream>#
2021-02-04 16:28:31
108
原创 【HDOJ DIYContest 37015&37016】ZUST2020新生训练
Contests370151001#include<bits/stdc++.h>using namespace std;int main(){ cout<<"Hello World\n"; return 0;}1002#include<bits/stdc++.h>using namespace std;int main(){ int a, b; cin>>a>>b; cout<<a+b<<
2021-02-02 17:47:31
24
原创 【vjudge contest 418548】2021 BUAA Winter Training 3(Private),签到题ABCDG
题目A Amazing Pizza/*题意:给出一个圆环和n个圆,求多少个圆在圆环内思路:先检查它是否在大圆内,再检查它是否在小圆外。*/#include<bits/stdc++.h>using namespace std;int main(){ double r, d; cin>>r>>d; int n; cin>>n; int ans = 0; for(int i = 1; i <= n; i++){ double
2021-02-02 17:33:28
43
原创 【Codeforces gym 102388】SUFE ICPC Team Formation Test,签到题BDG
B Stars/*题意:求二维平面上(x1,y1),(x2,y2)连成的直线上有多少个整数点思路:以(x1,y1)为原点建立新的坐标系,答案为gcd(|x2-x1|,|y2-y1|)+1*/#include<bits/stdc++.h>using namespace std;int gcd(int a, int b){return !b?a:gcd(b,a%b);}int main(){ int T; cin>>T; while(T--){ int x1,
2021-02-02 17:22:26
44
原创 【HDOJ 2020.09.29】一些语法水题ByVJ
By VJ小抄c版v2A//上次不是做过了#include<stdio.h>int main(){ char a, b, c, t; while(scanf("%c%c%c\n",&a,&b,&c)!=EOF){ if(a>b){t=a;a=b;b=t;} if(a>c){t=a;a=c;c=t;} if(b>c){t=b;b=c;c=t;} printf("%c %c %c\n",a,b,c); } return 0
2021-02-02 17:04:34
26
原创 【Atcoder abc087 D】People on a Line,BFS,图遍历
problemD - People on a Line / Time Limit: 2 sec / Memory Limit: 256 MB Score : 400 points Problem Statement There are N people standing on the x -axis. Let the coordinate of Person i be x i . For every i , x i is an integer between 0 and 10 9 (inclusive)
2021-02-02 16:58:38
29
原创 【Atcoder agc020 C】Median Sum,序列子集和中位数,bitset,01背包
problemC - Median Sum / Time Limit: 2 sec / Memory Limit: 512 MB Score : 700 points Problem StatementYou are given N integers A 1 , A 2 , …, A N . Consider the sums of all non-empty subsequences of A . There are 2 N − 1 such sums, an odd number. Let the
2021-02-02 16:58:17
34
原创 【Codeforces 842 B】Gleb And Pizza,模拟,几何。
problemB. Gleb And Pizzatime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGleb ordered pizza home. When the courier delivered the pizza, he was very upset, because several pieces of sausage lay on t
2021-02-02 16:30:39
24
原创 【Codeforces 862 D】Mahmoud and Ehab and the binary string,二分答案,构造,交互题
problemD. Mahmoud and Ehab and the binary stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMahmoud and Ehab are in the fourth stage now.Dr. Evil has a hidden binary string of length n. He gu
2021-02-02 15:27:55
34
原创 【Codeforces 1344 A】Hilbert‘s Hotel,哈希表,set维护
problemA. Hilbert’s Hoteltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputHilbert’s Hotel is a very unusual hotel since the number of rooms is infinite! In fact, there is exactly one room for every
2021-02-02 14:23:03
30
原创 编程语言列表?()
A# .NET ,A# (Axiom) ,A-0 System ,A+ ,A++ ,ABAP ,ABC ,ABC ALGOL ,ABSET ,ABSYS ,ACC ,Accent ,Ace DASL ,ACL2 ,ACT-III ,Action! ,ActionScript ,Ada ,Adenine ,Agda ,Agilent VEE ,Agora ,AIMMS ,Alef ,ALF ,ALGOL 58 ,ALGOL 60 ,ALGOL 68 ,ALGOL W ,Alice ,Alma-0 ,Ambie
2021-02-01 21:28:48
96
1
原创 2021牛客寒假算法基础集训营1,签到题ABFIJ
A 串//f[i]表示长度为i的有us的串的数量//有u但是u后面没有s的串的数量:总数-没有u的-有us的#include<bits/stdc++.h>using namespace std;typedef long long LL;const int maxn = 2e6+10;const LL mod = 1e9+7;LL pows(LL a, LL b, LL m) { a %= m; LL res = 1; while(b>0){ if(b&1
2021-02-01 19:30:12
49
Windows Servers2016 WSL环境安装
1951-04-24
mamsds5.17.exe
2020-04-02
discuz论坛实现qq小程序
2020-02-29
技嘉GA7PESH3主板说明书
2020-07-21
CE616263.zip
2020-07-21
Windows10/Servers2016应用商店恢复/安装
2018-06-08
Windows PE_DIY工具
2017-01-26
小哈里的留言板
发表于 2020-01-02 最后回复 2020-01-02
为什么发文章老是待审核啊
发表于 2018-06-07 最后回复 2018-06-08
左边侧栏的个人分类可以不折叠吗?
发表于 2018-05-20 最后回复 2018-06-07
刚更新的搜索功能有BUG
发表于 2018-05-29 最后回复 2018-06-01
UVa1368 DNA序列 学过C语言的帮我看一下问题在哪里,怎么改好吗?
发表于 2016-12-30 最后回复 2018-05-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人 TA的粉丝