摘要:
# Saruman's Army 首先对序列排序,然后逐个考虑覆盖,如果要覆盖当前的点,则标记点越靠后越好,所有向后找$R$,选择最靠后的标记,然后从标记点开始在向后找$R$也是被标记过的,直接跳过 ```cpp #include #include using namespace std; int 阅读全文
摘要:
# A. The Contest 想一想就知道,提交的时间无所谓,所以我们选择全部做完后的第一个时间间隔提交即可 ```cpp #include using namespace std; #define int long long int read() { int x = 0, f = 1, ch 阅读全文
摘要:
# A - Sandglass2 ```cpp #include using namespace std; #define int long long int32_t main() { int a , b; cin >> a >> b; cout using namespace std; #defi 阅读全文
摘要:
# A - Air Conditioner ```cpp #include using namespace std; int main() { int x; cin >> x; if( x >= 30 ) cout using namespace std; #define int long long 阅读全文
摘要:
[重现](https://ac.nowcoder.com/acm/contest/59729) # A-数数 ```cpp #include using namespace std; int main(){ string s; set cnt; cin >> s; for( auto c : s ) 阅读全文
摘要:
首先对字符串首先要求一个前缀函数$\pi[i]$。$\pi[i]$简单来说就是子串$s[0\dots i]$最长的相等的真前缀与真后缀的长度。 ```cpp vector prefix_function(const string &s) { int n = s.size(); vector pi(n 阅读全文
摘要:
# A 最小的数字 ```cpp #include using namespace std; #define int long long int32_t main() { ios::sync_with_stdio(false), cin.tie(0), cout.tie(0); int n; cin 阅读全文
摘要:
# **A - Similar String** ```cpp #include using namespace std; #define int long long int32_t main() { int n; string s , t; cin >> n >> s >> t; for( int 阅读全文
摘要:
# A. Another A+B Problem 暴力枚举出所有的情况,然后特判一下 ```cpp #include using namespace std; set res; int t; string a , b , c = "????????"; #define f(d) ((d[0]-'0' 阅读全文
摘要:
# A - 算法竞赛 ```cpp #include using namespace std; #define int long long void solve(){ int st , n , ed; cin >> st >> n; map cnt; for( int i = 1 , x ; i > 阅读全文