2023年4月14日
摘要: 对于任意一个只含数字1~n的有序数字串{a1,a2,……,an},比较数字串中所有相邻数字的大小,后者大于前者的用I表示,否则用D表示。例如,数字串{3,1,2,7,4,6,5},{2,1,3,7,4,6,5}和{3,1,2,7,5,6,4}就表示为'DIIDID'。"?"则表示两数的关系未知。例如 阅读全文
posted @ 2023-04-14 22:49 towboat 阅读(36) 评论(0) 推荐(0)
摘要: 多判断一个唯一性 only[ x] [0/1] #include <iostream> #include <cstring> #include <vector> #include <map> #include <algorithm> using namespace std; const int N= 阅读全文
posted @ 2023-04-14 16:53 towboat 阅读(17) 评论(0) 推荐(0)
摘要: #include <iostream> #include <cstring> #include <vector> #include <algorithm> using namespace std; const int N=1e5+3; int f[N],n,K; vector<int> g[N]; 阅读全文
posted @ 2023-04-14 15:18 towboat 阅读(8) 评论(0) 推荐(0)