算法描述: Given two integers representing the numerator and denominator of a fraction, return the fraction in string format. If the fractional part is rep ...
分类:
其他好文 时间:
2019-02-19 13:38:24
阅读次数:
125
#include #define ll long long #define rep(i,a,b) for(int i=a;i=p-k+1){ int j=(p-k+1)>0?(p-k+1):0;//中断后可能是负的 while(k+jTlen?Tlen:Slen; while(a=p-k+1){ i... ...
分类:
其他好文 时间:
2019-02-19 13:22:32
阅读次数:
222
某谷树剖模板 #include<bits/stdc++.h> using namespace std; #define ll long long #define ull unsigend long long #define rep(k,i,j) for(int k = i;k <= j; ++k) ...
分类:
其他好文 时间:
2019-02-17 20:44:38
阅读次数:
146
考试被我一觉睡过去了 只能赛后补题 A. 给你一个 n 个点的完全图,求出它最多的边不相交的生成树个数,并输出每棵树 $n \leq 2000$ sol: #include<bits/stdc++.h> #define LL long long #define rep(i,s,t) for(regi ...
分类:
数据库 时间:
2019-02-10 11:00:53
阅读次数:
266
A .A Prize No One Can Win 题意:给定N,S,你要从N个数中选最多是数,使得任意两个之和不大于S。 思路:排序,然后贪心的选即可。 #include<bits/stdc++.h> #define ll long long #define rep(i,a,b) for(int ...
分类:
其他好文 时间:
2019-02-06 17:09:28
阅读次数:
234
#include #define pii pair #define mp make_pair #define ll long long #define rep(i,a,b) for(int i=a;i>1; ll tmp1=getans(p,q[Mid]),tmp2=getans(p,q[Mid+1... ...
分类:
其他好文 时间:
2019-02-06 11:58:40
阅读次数:
179
Given the root of a binary tree, each node has a value from 0 to 25 representing the letters 'a' to 'z': a value of 0 represents 'a', a value of 1 rep ...
分类:
其他好文 时间:
2019-02-05 13:13:56
阅读次数:
142
B .Aesthetics in poetry 题意:给定N个数,(N<2000 ,a[i] <=1e9),让你找一个最大的K,使得N个数膜K的余数个数全都等于N/K个。 思路:我们找到N的因子,然后验证即可,复杂度O(N^2) #include<bits/stdc++.h> #define rep ...
分类:
其他好文 时间:
2019-02-04 20:53:32
阅读次数:
264
自然数拆分,完全背包 1 #include <cstdio> 2 #define ll long long 3 #define mod 2147483648 4 #define rep(i, a, b) for (int i = a; i <= b; i++) 5 6 int n; 7 ll f[4 ...
分类:
其他好文 时间:
2019-02-03 15:30:07
阅读次数:
153
HTTP Status 500 - org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: type Exception rep ...
分类:
编程语言 时间:
2019-02-03 12:17:34
阅读次数:
195