摘要:
题目链接: 一开始的想法:排序后枚举,但这样显然是 \(O(n^2)\) 的复杂度,会超时 #include <cstdio> #include <algorithm> const int N = 2e5 + 5; int a[N]; int main() { int n, c, res = 0; 阅读全文
摘要:
题目链接: 考虑使用循环链表来维护该环形数据结构。但下列代码只能通过70/100 #include <bits/stdc++.h> using namespace std; int ne[50]; int main() { int k, n, m; bool flag = true; cin >> 阅读全文