*博客头图：

RGB颜色，例如：#AFAFAF

Hover：

RGB颜色，例如：#AFAFAF

RGB颜色，例如：#AFAFAF

# gwj1139177410的博客

• 博客(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 65

#### 原创 【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 40

#### 原创 【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 47

#### 原创 【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 43

#### 原创 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 71

#### 原创 【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 57

#### 原创 【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 35

#### 原创 【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 35

#### 原创 【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 54

#### 原创 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 59

#### 原创 【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 46

#### 原创 【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 32

#### 原创 【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 46

#### 原创 【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 73

#### 原创 【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 59 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 47

#### 原创 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 58

#### 原创 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 1106 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 45

#### 原创 【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 53

#### 原创 【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 30

#### 原创 【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 50

#### 原创 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 768

#### 原创 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 57

#### 原创 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 50

#### 原创 C++STL优先队列小根堆大根堆自定义的应用

2021-02-04 16:28:31 167

#### 原创 【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 30

#### 原创 【vjudge contest 418548】2021 BUAA Winter Training 3（Private），签到题ABCDG

2021-02-02 17:33:28 65

#### 原创 【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 67

#### 原创 【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 33

#### 原创 【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 42

#### 原创 【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 47

#### 原创 【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 29

#### 原创 【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 43

#### 原创 【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 45

#### 原创 编程语言列表？（）

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 116 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 61

#### USACO翻译及题解

USACO教程,包含USACO全部英文原题，题解（NOCOW整理版），翻译，教程，代码，测试数据。

2018-05-23

#### Sony NWZ-M504 原版固件

Sony NWZ-M504原版固件。 若是意外将MP3格式化或者弄坏，可以将该固件备份拷贝回去复原

2017-01-26

2020-04-02

UEFI启动原理剖析

2017-01-26

#### Windows Servers2016 WSL环境安装

Windows Subsystem for Linux 安装程序 1、首先在设置中打开开发者模式 2、将安装包解压到C:\Users\Administrator 3、运行以下两行 dism /online /norestart /add-package /packagepath:Microsoft-Windows-Lxss-Optional-Package.cab /packagepath:Microsoft-Windows-Lxss-Optional-Package-en-US.cab /packagepath:Microsoft-Windows-Lxss-Package.cab /packagepath:Microsoft-Windows-Lxss-Package-en-US.cab dism /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all 4、重启后运行中输入bash即可。 默认系统是乌班图。

2018-06-08

2018-05-23

#### VBScript经典脚本+代码+exe编译器

VBS To Exe 编译器 各种经典脚本 VBScript相关代码

2017-01-26

#### discuz论坛实现qq小程序

1. 将 wmapi 放到 Discuz 根目录下 ，访问 https://网址/wmapi/wmapi_install.php 2. 填写小程序 appid 以及 appsecret 进行安装（至此，论坛接口已安装完成） 3. wmapp 即为小程序源码，用QQ提供的开发者工具打开 4. 修改 app.js 下的 base_url 以及 svr_url 为你的网址 base_url: 'https://www.xxxx.com/' svr_url: 'https://www.xxxx.com/wmapi/'

2020-02-29

#### potplayer类似windows的皮肤和亲民设置

potplayer类似windows的皮肤和亲民设置 皮肤包括wmp12.dsf。原装皮肤等 设置包括常用的双击放大缩小

2018-06-09

#### GUIDE(NOI_Windwos环境配置安装包)

GUIDE(NOI_Windwos环境配置安装包) NOI官网有下载，鉴于MinGW下载过慢，打包搬运。

2017-01-26

#### 技嘉GA7PESH3主板说明书

GA-7PESH3 Dual LGA2011插座主板 - Intel® E5-2600系列处理器 包括主板布局，硬件安装，BIOS设置相关的内容。

2020-07-21

2020-07-21

2018-06-08

2018-06-08

#### Windows PE_DIY工具

7-Zip+BOOTICE 1.3.3.2+DiskGenius 4.7.1.127+Registry Workshop+WimTool V1.30.2011.501+虚拟光驱+EasyBCD 单文件+GRLDR_Edit(引导编辑)+MsgDiyer(PE启动菜单界面修改)+PDF阅读器+UltraISO 9.6.2.3059+UltraISO 9.6.2.3059

2017-01-26

2018-12-22

#### OppoA1107安卓Linux

OppoA1107安卓Linux 可以在安卓系统上安装Linux、乌班图 包括系统镜像下载地址和一些软件，工具，教程

2018-06-09

2018-06-08

2017-01-26

2017-01-26

2017-01-26

#### UVa1368 DNA序列 学过C语言的帮我看一下问题在哪里，怎么改好吗？

###### 空空如也

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

TA关注的人 TA的粉丝