https://codeforces.com/contest/1372 A 众所周知,$1+1\neq 1$。 所以输出 \(n\) 个 $1$ 即可。 时间复杂度 \(O(tn)\)。 #include <bits/stdc++.h> using namespace std; int t; int ...
分类:
其他好文 时间:
2020-07-26 00:22:51
阅读次数:
52
地址:http://codeforces.com/contest/1384/problem/A 题意: 输出n+1个字符串,si和si+1的公共前缀长为ai 解析: 一个一个补的话,会很麻烦。 看范围:ai<=50,就是说前缀最长为50,那么考虑把所有字符串长度都构造为长度>50,那么对于每一个ai ...
分类:
其他好文 时间:
2020-07-26 00:02:58
阅读次数:
54
最近在Linux上安装了Mysql,然后在Windows环境下通过Navicat来连接时,出现报错:1045 Access denied for user 'root'@'XXX' (using password: YES),如下: 首先,在Linux中是可以正常登录mysql,所以不会是用户密码错 ...
分类:
数据库 时间:
2020-07-26 00:00:50
阅读次数:
105
1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <vector> 5 using namespace std; 6 const int SIZE = 1e6; 7 int heap[SIZE], ...
分类:
编程语言 时间:
2020-07-25 23:58:20
阅读次数:
91
1.说明 在使用order by时,经常会出现Using fileSort 在使用group by时,使用不当,会出现Using temporay 二:排序 1..Using fileSort 说明会对数据使用一个外部的索引排序 而不是内部的索引顺序进行 mysql无法利用索引完成排序操作称为文件排 ...
分类:
编程语言 时间:
2020-07-25 23:51:41
阅读次数:
70
链接 题意: 有字符串$A$,\(B\),每次在$A$中选取一部分相同的字母,改成另一个比该字母大的字母,问将A改成B的最少步骤 分析: 从样例看 3 aab bcc (aab-bbb-bcc) 本例中,第2个‘a'先转化成’b',再连同’b'转化为‘c'。不难看出减少操作次数可以通过先转化为一个中 ...
分类:
其他好文 时间:
2020-07-25 23:50:05
阅读次数:
87
代码: #include <iostream>#include <stack># include <string>#include <stdexcept> using namespace std; class My_Queue{public: My_Queue(){}; ~My_Queue(){}; ...
分类:
编程语言 时间:
2020-07-25 23:40:07
阅读次数:
72
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Text; using System.Drawing; using System.IO; namespa ...
1 using System; 2 using System.Net; 3 using System.IO; 4 using System.Text; 5 using System.Text.RegularExpressions; 6 using System.Net.Security; 7 usi ...
分类:
其他好文 时间:
2020-07-25 23:19:26
阅读次数:
198
1 #include<bits/stdc++.h> 2 using namespace std; 3 int tot,n,m,s,ver[2*5000010],head[2*500010],nxt[2*500010],f[500010][30],d[500010]; 4 void add(int x ...
分类:
其他好文 时间:
2020-07-25 23:16:25
阅读次数:
65