文明大学生

数学公式

2019年10月19日

B - You Are Given a Decimal String... CodeForces - 1202B

摘要: #include <bits/stdc++.h> using namespace std; /* 这道题的难点在于怎样加x或者y才能使的a转化为b,并且加的x和y的和最少 这道题竟然用了floyd,转换成求最短路 这才深刻地体会到,我根本不会算法 */ const int maxn=10; const int INF=0x3f3f3f3f; int dis[maxn][maxn]; int num 阅读全文

posted @ 2019-10-19 10:40 文明大学生 阅读(160) 评论(0) 推荐(0)

D - Print a 1337-string... CodeForces - 1202D

摘要: #include <bits/stdc++.h> using namespace std; /* 给你一个数n,让你求一个串,里面的子序列“1337”的数量恰好为n 开始时用1的数量*C(m,2)*7的数量,不好处理 题解中用13377773333337的形式,使得C(m,2)+7的数量=n; 这样更好处理 */ typedef long long ll; const int maxn=1e9; 阅读全文

posted @ 2019-10-19 09:45 文明大学生 阅读(124) 评论(0) 推荐(0)

导航