2022年3月23日

摘要: 1 #include <bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 int main() 5 { 6 int T,n; 7 scanf("%d",&T); 8 while(T--) 9 { 10 scanf("%d" 阅读全文
posted @ 2022-03-23 23:49 OopsOops 阅读(17) 评论(0) 推荐(0) 编辑

2022年3月20日

摘要: 1 #include <bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 const int N = 1e7 + 9; 5 int a[100]; 6 bool vis[N]; 7 int n, x; 8 int res 阅读全文
posted @ 2022-03-20 16:23 OopsOops 阅读(73) 评论(0) 推荐(0) 编辑
 
摘要: 1 #include <bits/stdc++.h> 2 using namespace std; 3 using LL = long long; 4 int mp[505][505], ans[505][505]; 5 bool dp[505][505]; 6 int n, m; 7 int ma 阅读全文
posted @ 2022-03-20 12:48 OopsOops 阅读(98) 评论(0) 推荐(0) 编辑

2022年3月18日

摘要: 1 #include <bits/stdc++.h> 2 using namespace std; 3 #define p a[i].val 4 struct node{ 5 int val; 6 int cnt = 0; 7 }fa[100005]; 8 9 int vis[100005]; 10 阅读全文
posted @ 2022-03-18 09:18 OopsOops 阅读(29) 评论(0) 推荐(0) 编辑

2022年3月17日

摘要: 1 #include <bits/stdc++.h> 2 using namespace std; 3 4 double a[100005], b[100005]; 5 double power(double a, int n) { 6 double res = 1.0; 7 for (; n; n 阅读全文
posted @ 2022-03-17 23:45 OopsOops 阅读(24) 评论(0) 推荐(0) 编辑

2021年12月9日

摘要: 1 /*第一行输入两个整数 n,m (1≤n,m≤10^5),表示姜的个数以及询问次数。 2 第二行输入 n 个整数 a1,a2,…,an (1≤ai≤10^9),表示 n 颗姜的初始高度。 3 接下来输入 m 行,每行两个整数 xi,yi (0≤xi≤10^18,0≤yi<n),表示两种魔法的施法 阅读全文
posted @ 2021-12-09 20:35 OopsOops 阅读(45) 评论(0) 推荐(0) 编辑
 
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 long long sum[100005] = { 0 }; 4 long long square[100005] = { 0 }; 5 long long ans[10] = { 0 }; 6 v 阅读全文
posted @ 2021-12-09 20:32 OopsOops 阅读(62) 评论(0) 推荐(0) 编辑
 
摘要: 1 #include <stdio.h> 2 3 long long s[20], x[20] = { 0 }, c,sum=0; int n; 4 //回溯法解决子集和问题 ,子集中的那个数若存在则记为1,否则为0 5 int backtrack(int t) { 6 static int cou 阅读全文
posted @ 2021-12-09 20:30 OopsOops 阅读(25) 评论(0) 推荐(0) 编辑
 
摘要: 1 #include<bits/stdc++.h> 2 using namespace std; 3 vector<char> str(50000,0); 4 vector <long long> pri; 5 //**开始定义一个全局变量数组,每个下表对应的值默认为0** 6 int pm[200 阅读全文
posted @ 2021-12-09 20:29 OopsOops 阅读(134) 评论(0) 推荐(0) 编辑
 
摘要: 1 #include<bits/stdc++.h> 2 char s1[10005], s2[10005]; 3 void judge() { 4 int len2 = 0; 5 for (int j = 0; s1[j] != '\0'; j++) { 6 len2++; 7 if (s1[j] 阅读全文
posted @ 2021-12-09 20:26 OopsOops 阅读(33) 评论(0) 推荐(0) 编辑