摘要:
problemsolutioncodes#include#includeusing namespace std;int main(){ string s, ss; while(cin>>ss)s += ss; int a = 0, b = 0; ... 阅读全文
摘要:
problemn个人,每个人左手右手各写有一个数字。把n个人排成一列,每个人得到的奖金是前面所有人左手上数字的乘积除以自 己右手上的数字下取整。最小化每个人奖金的最大值。solution一、贪心: + 按左手数字乘右手数字从小到大排序 + 小的在前,大的在后二、证明:... 阅读全文
摘要:
problemsolutioncodes#include#include#includeusing namespace std;void print(char a, int b){ for(int i = 0; i >n>>m>>k; string s; cin... 阅读全文
摘要:
problemsolutioncodes#includeusing namespace std;int main(){ int n; unsigned long long f=1; cin>>n; for(int i=1;i<=n;i++) f... 阅读全文
摘要:
0x01紫书风格#include // max#include // assert#include // printf,sprintf#include // strlen#include // cin,cout#include // ... 阅读全文
摘要:
problemsolutioncodes//kosaraju#include#include#include#define maxn 200010using namespace std;vectorG[maxn], rG[maxn];vectorvs, cmp[max... 阅读全文
摘要:
problemsolutioncodes//just for test2#include#include#include#includeusing namespace std;int n, m, x, d[210], f[210][50];string s, w[20... 阅读全文
摘要:
problem给出一个有向图求从某一点出发到所有点的最短路solutionSPFAcodes#include#include#include#define maxn 10010#define maxm 500010using namespace std;//Grape... 阅读全文
摘要:
problemsolutioncodes//多少个最长不上升子序列可以覆盖这个数列,其实是等效于最长上升子序列的长度#include#includeusing namespace std;int n, h[50], k[50], ans1, ans2 = 1;int ... 阅读全文