
HDU
LOUTINI
这个作者很懒,什么都没留下…
展开
-
HDU - 3506 Monkey Party
HDU 3506#include"stdio.h"#include"string"#include"algorithm"using namespace std;#define INF 99999999int dp[2001][2001];int s[2001][2001];int mk[2001];unsigned long long原创 2018-07-16 21:56:34 · 570 阅读 · 0 评论 -
HDU - 1262 寻找素数对
把输入的数n除以2然后用i从n/2到1遍历,满足条件i和n-i是素数就好,提前打个表#include"bits/stdc++.h"using namespace std;int i,j;char isp[10005];void prime(){ memset(isp,'Y',sizeof(isp)); isp[0]=isp[1]='N'; for(i=2;i&...原创 2018-05-20 08:17:37 · 727 阅读 · 0 评论 -
HDU - 1004 Let the Balloon Rise
//注意,这样写出来的代码,flag数组里面的数量要比实际字符串数量少一,但对此答案无影响,需要的时候加一个一即可#include"iostream"#include"stdio.h"#include"string.h"using namespace std;int max(int flag[1050],int N){ int i;原创 2018-03-20 11:04:33 · 163 阅读 · 0 评论 -
HDU - 1002 A + B Problem II
#include"iostream"#include"stdio.h"#include"string.h"using namespace std;int max(int a,int b);void result_and_print(int c[1050],int d[1050], int max_ab, int T);void sums(ch原创 2018-03-19 16:57:30 · 146 阅读 · 0 评论 -
HDU - 1312 Red and Black
#include"stdio.h"#include"queue"#include"stdlib.h"using namespace std;int dir[4][2] = { 0,1,0,-1,-1,0,1,0 };char map[20][20]; int W, H,num;struct node { int x, y; };#defi原创 2018-07-15 22:08:45 · 217 阅读 · 0 评论 -
HDU - 2021 发工资咯
#include"stdio.h"int good(int a[],int n,int count){ int i,j, k ,u; int b[6]={100,50,10,5,2,1,}; /*面值*/ count=0; for(i=0;i<n;i++){ for(j=0;j<6;j++){ k=a[i]/b[j]; count+=k; u=a[i]%b[j...原创 2019-04-12 10:27:28 · 177 阅读 · 0 评论