摘要: \[ 1 \ 2 \ 2 \ 5 \\ \ \ 1 \ 2 \ 2 \\ \ \ \ \ 1 \ 2 \\ \ \ \ \ \ \ 1 \\ \] 观察发现每一位只需要维护后缀和 #include <bits/stdc++.h> #define LL long long using namespac 阅读全文
posted @ 2022-02-24 22:28 Angels_of_Death 阅读(48) 评论(0) 推荐(0)
摘要: A #include <bits/stdc++.h> using namespace std; char s[10]; void solve() { scanf("%s", s + 1); map<char, int> Map; bool flag = 1; for (int i = 1; i <= 阅读全文
posted @ 2022-02-24 13:01 Angels_of_Death 阅读(25) 评论(0) 推荐(0)
摘要: A #include <bits/stdc++.h> using namespace std; const int N = 1e5 + 10; int n; int a[N], b[N]; void solve() { cin >> n; for (int i = 1; i <= n; i ++ ) 阅读全文
posted @ 2022-02-22 23:16 Angels_of_Death 阅读(34) 评论(0) 推荐(0)
摘要: A #include <bits/stdc++.h> #define LL long long using namespace std; int T, n, m; void solve() { scanf("%d", &n); int res = 0; for (int i = 1; i <= n; 阅读全文
posted @ 2022-02-21 22:46 Angels_of_Death 阅读(41) 评论(0) 推荐(0)
摘要: A #include <bits/stdc++.h> using namespace std; int main() { int a, b; scanf("%d%d", &a, &b); if (a > b) swap(a, b); if (b - a == 1 || b - a == 9) put 阅读全文
posted @ 2022-02-20 23:23 Angels_of_Death 阅读(96) 评论(0) 推荐(0)
摘要: A #include <bits/stdc++.h> using namespace std; int main() { int x; scanf("%d", &x); printf("%.10lf\n", sqrt((12800000 + x)) * sqrt(x)); return 0; } B 阅读全文
posted @ 2022-02-20 00:12 Angels_of_Death 阅读(89) 评论(0) 推荐(0)
摘要: A #include <bits/stdc++.h> #define LL long long using namespace std; const int N = 1e5 + 10; int n; int a[N]; void solve() { scanf("%d", &n); for (int 阅读全文
posted @ 2022-02-13 19:37 Angels_of_Death 阅读(60) 评论(3) 推荐(0)
摘要: A class Solution { public: int countOperations(int num1, int num2) { int cnt = 0; while (num1 != 0 && num2 != 0) { if (num1 >= num2) num1 -= num2; els 阅读全文
posted @ 2022-02-13 12:29 Angels_of_Death 阅读(30) 评论(0) 推荐(0)
摘要: 动态开点只能开$Ofast$莽过去 #pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; const int N = 15000010; int n, Q, root, cnt, L[N], R[N], 阅读全文
posted @ 2022-02-12 23:37 Angels_of_Death 阅读(36) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; const int N = 5e5 + 10; int n, m; int a[N]; struct Node { int l, r; int sum, lmax, rmax, tmax; }tr[N * 4 阅读全文
posted @ 2022-02-12 18:27 Angels_of_Death 阅读(23) 评论(0) 推荐(0)