摘要:
原题链接 题解 贪心,遇到大坑就建立一条到小坑自动减少的区间 code #include<bits/stdc++.h> using namespace std; int a[100005]; int main() { int n; cin>>n; int sum=0; for(int i=1;i<= 阅读全文
posted @ 2024-06-26 13:08
纯粹的
阅读(16)
评论(0)
推荐(0)
摘要:
原题链接 题解 随便找两个数字,删哪个更优? 发现了什么规律? code #include<bits/stdc++.h> using namespace std; struct node { int v,id,l,r; }c[300]; int main() { string s; cin>>s; 阅读全文
posted @ 2024-06-26 11:50
纯粹的
阅读(15)
评论(0)
推荐(0)
摘要:
原题链接 题解 对于线段A,选与线段A有交叉,且结束时间比A晚的线段一定不比选线段A更优 code #include<bits/stdc++.h> using namespace std; struct node { int l,r; }seg[1000005]; bool cmp(node a,n 阅读全文
posted @ 2024-06-26 11:11
纯粹的
阅读(27)
评论(0)
推荐(0)

浙公网安备 33010602011771号