
二分答案
文章平均质量分 90
Achanss
My life is good, and u just make it better!
展开
-
CodeForces——1077 D. Cutting Out(二分答案)
题目链接解题思路:直接从众多“个数”中挑选满足答案的可能有很多。。。题目的限制条件是“find such array t that you can cut out the copy of t from s maximum number of times.” 所以要先二分找一个最大的amount,有了这个amount再去找k个满足的“个数”就可以啦/** @Author: Achan* ...原创 2018-11-17 17:46:15 · 1034 阅读 · 0 评论 -
蓝桥训练赛
#include<bits/stdc++.h>using namespace std;typedef long long ll;int main(void){ cin.tie(0); int n; cin >> n; vector <int> a(n),b(n),c(n); for(int i =0; i<n...原创 2019-03-19 21:43:13 · 227 阅读 · 0 评论 -
PAT (甲级) 1010 Radix (二分)
#include<bits/stdc++.h>using namespace std;typedef long long LL;string s[3];LL N[3],ans = -1;inline int toNum(char c){ if(c>='0' && c<='9') return c - '0'; return c -...原创 2019-08-16 13:58:50 · 230 阅读 · 0 评论