摘要:
A:开个桶统计一下,但是不要忘记k和0比较大小 #include<bits/stdc++.h> using namespace std; char s[1100]; int cnt[110]; int main() { int k; scanf("%s%d", s, &k); int n = str 阅读全文
摘要:
哈希 cf原题。。。没见过的话真想不出来 将邻接表排序哈希,判断是否相同,但是会漏掉两点相邻的情况,于是再把自己加入自己的邻接表,然后再哈希判断。 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int 阅读全文
摘要:
dp+树状数组 一维排序,一维离散化,然后跑lis,其实就是一个二维偏序 #include<bits/stdc++.h> using namespace std; const int N = 200010; int dp[N], tree[N]; struct data { int x, y, p; 阅读全文