摘要: #include <bits/stdc++.h> using namespace std; const int N=1e6+10; int s[N<<1],q[N<<1]; int n; int main(){ scanf("%d",&n); for(int i=1;i<=n;i++) scanf( 阅读全文
posted @ 2025-03-30 11:25 九三青梧 阅读(6) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; const int N=5e5+10; int s[N],q[N]; int n,m; int main(){ scanf("%d%d",&n,&m); for(int i=1;i<=n;i++) scanf 阅读全文
posted @ 2025-03-30 10:48 九三青梧 阅读(6) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; const int N=1e3+10; typedef long long ll; int n,m,k; int w[N][N],res_min[N][N],res_max[N][N]; int a[N],q 阅读全文
posted @ 2025-03-30 09:10 九三青梧 阅读(6) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; const int N=5e4+10; int w[N],f[N],n,m,q[N]; bool check(int limit){ int hh=0,tt=0; for(int i=1;i<=n;i++){ 阅读全文
posted @ 2025-03-30 08:23 九三青梧 阅读(16) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; const int N=3e5+10; typedef long long ll; int n,m; ll s[N]; int q[N]; int main(){ scanf("%d%d",&n,&m); f 阅读全文
posted @ 2025-03-23 10:36 九三青梧 阅读(9) 评论(0) 推荐(0)
摘要: const int N=100010; class Solution { private: int q[N]; public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { int n=nums.size(); int hh=0,t 阅读全文
posted @ 2025-03-23 09:13 九三青梧 阅读(4) 评论(0) 推荐(0)
摘要: #include <bits/stdc++.h> using namespace std; const int N=1000010; int n,k; int q[N],a[N]; int main(){ scanf("%d%d",&n,&k); for(int i=1;i<=n;i++) scan 阅读全文
posted @ 2025-03-23 09:07 九三青梧 阅读(13) 评论(0) 推荐(0)
摘要: const int N=15; class Solution { public: int dp(int cnt[],int num,int len,int offset,int status){ if(len==0) return 1; int ans=0; int f=(num/offset)%1 阅读全文
posted @ 2025-03-16 09:12 九三青梧 阅读(9) 评论(0) 推荐(0)
摘要: const int N=15; class Solution { public: int dp(int cnt[],int num,int len,int offset,int status){ if(len==0) return 1; int ans=0; int f=(num/offset)%1 阅读全文
posted @ 2025-03-16 09:10 九三青梧 阅读(7) 评论(0) 推荐(0)
摘要: const int mod=1000000007,N=25,M=410; class Solution { public: int f[N][M][2]; bool check(string num,int min_sum,int max_sum){ int sum=0; for(int i=0;i 阅读全文
posted @ 2025-03-16 09:09 九三青梧 阅读(9) 评论(0) 推荐(0)