02 2020 档案
摘要:题目链接这题关于DP用f[i][j]表示横坐...
阅读全文
摘要:P1120 小木棍 [数据加强版]题解:#include #include #include int n, cnt, tot, maxn, minn, tm[70];void dfs(int res,int su...
阅读全文
摘要:CF11A Increasing Sequence入门题,就不解释了题解:算法复杂度为O(n)#include #include using namespace std;int a[2001];int main(...
阅读全文
摘要:CF1B Spreadsheets题解:#include using namespace std;char x[1000010];int main() { int n,i,j,k; cin>>n; for(i=1...
阅读全文
摘要:CF25A IQ test题解:#include using namespace std;int a[101];int main(int argc, char **argv){ int n; cin>...
阅读全文
摘要:题目链接由于此题过于水,所以就不解释了直接上题解 题解: #include using namespace std;int a[101];int main(int argc, char **argv){ i...
阅读全文
摘要:大水题让我们介绍一下STL库中的绝对值函数-...
阅读全文
摘要:CF9C Hexadecimal's Numbersせむすけヌ题解:#include#includeusing namespace std;int a[100],ans,n;int pow_(int a,int ...
阅读全文
摘要:P2404 自然数的拆分问题题解:#include using namespace std;int n,sum;int a[15]={1};void print(int t){ for(int i=1;i>n; ...
阅读全文
摘要:P1118 [USACO06FEB]数字三角形`Backward Digit Su`…第一次看到这个题的感受 :题解:#include using namespace std;int n,sum;int ha[1...
阅读全文
摘要:P1023 税收与补贴问题题解:#include#include#includeusing namespace std;int s, a, b, d, n = 0;int a1, a2, a3, b1, b2, ...
阅读全文
摘要:模拟排序概率论解模拟题的方法:(1)认真仔细...
阅读全文
摘要:哈希表若关键字为k,则其值存放在f(k)的存...
阅读全文
摘要:P1024 一元三次方程求解 题解:#include using namespace std;int main(){ double a,b,c,d; cin>>a>>b>>c>>d; for(doub...
阅读全文
摘要:P1072 Hankson 的趣味题题解: 提交效果图,亲试#include#include#include#define ll long longusing namespace std;int prime[10...
阅读全文
摘要:CF5A Chat Server's Outgoing Traffic题解:#includeusing namespace std;int ans=9,people ;int main() { string k;...
阅读全文
摘要:题解 CF4B 【Before an Exam】超水的一道贪心题 贪心贪心的定义: 贪心选择是指所求问题的整体最优解可以通过一系列局部最优的选择,即贪心选择来达到。这是贪心算法可行的第一个基本要素,...
阅读全文
摘要:CF3A Shortest path of the king题解:#includeusing namespace std;string s1,s2;int main() { cin>>s1>>s2; int x1...
阅读全文
摘要:P3955 图书管理员题解:#include...
阅读全文
摘要:P1012 拼数题解:#include#include using namespace std;string a[30]; int main(){ int n; cin>>n; for(int...
阅读全文
摘要:P1093 奖学金题解:#include using namespace std;struct node { int a; int b; int c; int d; int w;};bool f(node a,n...
阅读全文
摘要:P1068 分数线划定 题解:#includeusing namespace std;long long n,m,f=0,x=0,r=0;long long k[100000],s[100000];int mai...
阅读全文
摘要:P158 导弹拦截题解:#includeusing namespace std;struct ca{ int o,p;}o[100005];int cmp(ca a,ca b){ return a.o...
阅读全文
摘要:CF2A Winner题解:#include #include #include using namespace std;map mp,mpp;int n,a[100001],maxn=-99999999;str...
阅读全文
摘要:CF1C Ancient Berland Circus题解:#include using namespace std;char x[1000010];int main() { int n,i,j,k; cin>>...
阅读全文
摘要:CF1A Theatre Square题解:#include using namespace std;int main(){ long long a,m,n; cin>>n>>m>>a; cout<<((n-1)...
阅读全文
摘要:题目传送门题解:#include using...
阅读全文
摘要:题目传送门题解:#includeusing ...
阅读全文
摘要:题目题解:#include using na...
阅读全文

浙公网安备 33010602011771号