比赛的时候正在被各种期末课设折磨,结果发病了 D /* 每次求mex,如果mex<n,那么让a[mex]=mex,如果mex=n,那么挑a[i]!=i的位置,令a[i]=mex 这样每安排好一个位置最多进行两次操作 */ #include<bits/stdc++.h> using namespace ...
分类:
其他好文 时间:
2020-07-09 19:19:01
阅读次数:
53
因为题目已知至少要k-2个 假设我们取了k个,使得答案最大 那么因为对于每个数来说至少k-2个数在这位是1 因此我们只要任意选三个数,都能保证在每一位上都有至少一个数为1 #include<bits/stdc++.h> using namespace std; typedef long long l ...
分类:
其他好文 时间:
2020-07-09 15:12:45
阅读次数:
67
模板 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<complex> #define maxn 4000010 #define PI (acos(-1.0)) using namespac ...
分类:
其他好文 时间:
2020-07-09 12:31:09
阅读次数:
80
最大并发200,100的并发递增施压,到达200后持续360秒1:this group will start:表示总共要生成的最大线程数,如图:设置为:200 个,表示总共会加载到 200个线程2:first,wait for:第一个线程从点击执行之后多长时间开始加载,如图:设置为 0 秒,表示点击 ...
分类:
编程语言 时间:
2020-07-09 10:47:44
阅读次数:
137
最短路模型 #include<cstring> #include<iostream> #include<algorithm> using namespace std; typedef pair<int,int> PII; const int N = 110; int n,m; int g[N][N] ...
题目链接: F - Strivore 题意: 求出在一个字符串s中插入n个小写字母,有多少不同的结果。 思路: 在字符串 s 中插入 n 个小写字母,就相当于在 n+s.length 个格子里面填入小写字母,要求其存在为 s 的子序列(不一定要连续)。 先确定 s 第一个字母所在的位置,假设在位置 ...
分类:
其他好文 时间:
2020-07-09 09:15:35
阅读次数:
345
大水题来啦! 不过要注意A B都为零的情况,所以用do-while循环 C++ 1 #include<iostream> 2 #include<string> 3 #include<algorithm> 4 5 using namespace std; 6 7 int main() { 8 int ...
分类:
编程语言 时间:
2020-07-09 00:58:34
阅读次数:
73
2020-07-08日报博客 1.完成的事情: 学习Java黑马系列Java视频教程31-60集。 完成面向对象程序设计小学期任务9:整数链表 代码如下: #include <stdio.h> #include<iostream> using namespace std; class Num { p ...
分类:
其他好文 时间:
2020-07-09 00:37:22
阅读次数:
111
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u ...
#include <iostream> #include <vector> using namespace std; int n; const int MaxN = 1e5; long long w[MaxN + 1]; long long ans; vector<int> g[MaxN + 1]; ...
分类:
编程语言 时间:
2020-07-08 20:01:38
阅读次数:
78