上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 50 下一页
摘要: problemsolutioncodes#include#includeusing namespace std;int main(){ string s, ss; while(cin>>ss)s += ss; int a = 0, b = 0; ... 阅读全文
posted @ 2018-05-23 21:21 gwj1139177410 阅读(146) 评论(0) 推荐(0) 编辑
摘要: problemn个人,每个人左手右手各写有一个数字。把n个人排成一列,每个人得到的奖金是前面所有人左手上数字的乘积除以自 己右手上的数字下取整。最小化每个人奖金的最大值。solution一、贪心: + 按左手数字乘右手数字从小到大排序 + 小的在前,大的在后二、证明:... 阅读全文
posted @ 2018-05-23 21:15 gwj1139177410 阅读(252) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#include#include#includeusing namespace std;void print(char a, int b){ for(int i = 0; i >n>>m>>k; string s; cin... 阅读全文
posted @ 2018-05-23 12:49 gwj1139177410 阅读(109) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes#includeusing namespace std;int main(){ int n; unsigned long long f=1; cin>>n; for(int i=1;i<=n;i++) f... 阅读全文
posted @ 2018-05-23 12:47 gwj1139177410 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 0x01紫书风格#include // max#include // assert#include // printf,sprintf#include // strlen#include // cin,cout#include // ... 阅读全文
posted @ 2018-05-23 12:20 gwj1139177410 阅读(142) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//kosaraju#include#include#include#define maxn 200010using namespace std;vectorG[maxn], rG[maxn];vectorvs, cmp[max... 阅读全文
posted @ 2018-05-23 12:16 gwj1139177410 阅读(110) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//just for test2#include#include#include#includeusing namespace std;int n, m, x, d[210], f[210][50];string s, w[20... 阅读全文
posted @ 2018-05-23 12:16 gwj1139177410 阅读(133) 评论(0) 推荐(0) 编辑
摘要: problem给出一个有向图求从某一点出发到所有点的最短路solutionSPFAcodes#include#include#include#define maxn 10010#define maxm 500010using namespace std;//Grape... 阅读全文
posted @ 2018-05-23 12:15 gwj1139177410 阅读(108) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//多少个最长不上升子序列可以覆盖这个数列,其实是等效于最长上升子序列的长度#include#includeusing namespace std;int n, h[50], k[50], ans1, ans2 = 1;int ... 阅读全文
posted @ 2018-05-23 12:15 gwj1139177410 阅读(158) 评论(0) 推荐(0) 编辑
摘要: problemsolutioncodes//二分答案//QAQ注意:起点和终点也是有石头的w#include#include#define maxn 100010using namespace std;int ll, n, m;int a[maxn];bool che... 阅读全文
posted @ 2018-05-22 13:27 gwj1139177410 阅读(107) 评论(0) 推荐(0) 编辑
上一页 1 ··· 29 30 31 32 33 34 35 36 37 ··· 50 下一页
选择