![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
牛客题
击剑的剑没有剑柄
这个作者很懒,什么都没留下…
展开
-
vector排序
vector的cmp#include<bits/stdc++.h>using namespace std;int n;vector<string> q;int k = 0;bool cmp(string a , string b){ int len1 = a.length() , len2 = b.length(); int i = 0; for( ; i < len1 && i < len2 ; i ++ ){原创 2021-11-20 20:59:34 · 488 阅读 · 0 评论 -
牛客—— [USACO 2007 Jan S] Protecting the Flowers(贪心)
[USACO 2007 Jan S] Protecting the Flowers题目链接:https://ac.nowcoder.com/acm/problem/25043#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N = 2e6 + 10;struct cow{ int t,d; double s;}q[N];bool cmp(cow a, cow原创 2021-11-11 13:18:43 · 126 阅读 · 0 评论 -
牛客-铺地毯(简单思维题)
铺地毯题目链接https://ac.nowcoder.com/acm/problem/16593#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e6 + 10;struct area{ int a , b , x , y; }q[N];int main(){ int n; scanf("%d",&n); for(int i原创 2021-11-11 09:35:15 · 128 阅读 · 0 评论 -
牛客-主持人的烦恼(简单贪心)
主持人的烦恼(简单贪心)https://ac.nowcoder.com/acm/problem/13591#include<bits/stdc++.h>using namespace std;const int N = 1e5 + 10;int n,m;int main(){ while(cin>>n>>m){ int q[N],s[N]; for(int i = 0 ; i < n ; i ++) cin>>原创 2021-11-09 20:14:39 · 250 阅读 · 0 评论