随笔分类 -  HDUACM

一些acm题目解答
摘要:#include<cstdio> #include<iostream> #include<cstring> using namespace std; int main(){ int y,m,d; int t; scanf("%d",&t); while(t--){ scanf("%d%d%d",&y 阅读全文
posted @ 2017-01-22 23:15 王坤1993 阅读(191) 评论(0) 推荐(0)
摘要:#include <stdio.h> #include <string.h> #include <algorithm> using namespace std; int n,k,dp[105][105],a[105][105]; int to[4][2] = {1,0,-1,0,0,1,0,-1}; 阅读全文
posted @ 2017-01-22 23:14 王坤1993 阅读(168) 评论(0) 推荐(0)
摘要:#include<iostream> #include<cmath> using namespace std; struct Point { double x,y; }; double dis_sq(const Point& a,const Point& b) //距离平方 { return (a. 阅读全文
posted @ 2017-01-22 23:13 王坤1993 阅读(304) 评论(0) 推荐(0)
摘要:#include<iostream> using namespace std; int main() { int cases; int k; cin>>cases; while(cases--) { int y,n; cin>>y>>n; int num=0; for(k=y;;k++) { if( 阅读全文
posted @ 2017-01-21 21:02 王坤1993 阅读(143) 评论(0) 推荐(0)
摘要:#include <map> #include <string.h> #include <iostream> using namespace std; #include<stdio.h> int main() { char s1[20],s2[20],s[3005],s3[20],c,a[100]; 阅读全文
posted @ 2017-01-21 21:00 王坤1993 阅读(160) 评论(0) 推荐(0)
摘要:#include <iostream> #include <string> #include <cstring> #include <stack> #include <algorithm> using namespace std; const int inf = 1<<30; struct node 阅读全文
posted @ 2017-01-21 20:56 王坤1993 阅读(162) 评论(0) 推荐(0)
摘要:#include<iostream> using namespace std; #define N 5050 char a[N],b[N],tmp[N]; void Read(char p[]) { getchar(); gets(tmp); while(gets(tmp)) { if(strcmp 阅读全文
posted @ 2017-01-21 20:54 王坤1993 阅读(255) 评论(0) 推荐(0)
摘要:#include <iostream> #include <cstdio> #include <cstring> #include <queue> using namespace std; class Data { public: int Etime; int x, y; int count; }; 阅读全文
posted @ 2017-01-21 20:53 王坤1993 阅读(223) 评论(0) 推荐(0)
摘要:#include <iostream> #include <stdio.h> using namespace std; int main() { int t; double x1,y1,x2,y2,x3,y3,a,k,s; cin>>t; while(t--) { cin>>x1>>y1>>x2>> 阅读全文
posted @ 2017-01-21 20:51 王坤1993 阅读(145) 评论(0) 推荐(0)
摘要:#include <stdio.h>#include <string.h>struct milk{ char brand[128]; int price; int volume; double value;}a[100];int main(void){ int i,t,n,d; struct mil 阅读全文
posted @ 2017-01-21 20:50 王坤1993 阅读(218) 评论(0) 推荐(0)
摘要:#include <iostream> #include <algorithm> #include <cstring> using namespace std; class Data { public: int S, Height; int upl, uph; }; Data Da[100]; in 阅读全文
posted @ 2017-01-20 22:41 王坤1993 阅读(625) 评论(0) 推荐(0)
摘要:#include<stdio.h>#include<string.h>const int MAXN=1000;int map[MAXN][MAXN];int n;int linker[MAXN];bool used[MAXN];bool dfs(int a){ for(int i=0;i<n;i++ 阅读全文
posted @ 2017-01-20 22:38 王坤1993 阅读(216) 评论(0) 推荐(0)
摘要:#include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<queue> using namespace std; #define MAXN 1000007 typedef long long ll; 阅读全文
posted @ 2017-01-20 22:31 王坤1993 阅读(314) 评论(0) 推荐(0)
摘要:#include <cstdlib> #include <cstring> #include <cstdio> using namespace std; char s[1005]; int len, Mp[25] = {1,1,2,6,4,2,2,4,2,8,4,4,8,4,6,8,8,6,8,2} 阅读全文
posted @ 2017-01-20 22:28 王坤1993 阅读(200) 评论(0) 推荐(0)
摘要:#include <stdio.h> int main() { int t; double x, y; scanf("%d", &t); for(int i = 1; i <= t; ++i){ scanf("%lf%lf", &x, &y); printf("Property %d: This p 阅读全文
posted @ 2017-01-20 22:27 王坤1993 阅读(143) 评论(0) 推荐(0)
摘要:#include <iostream>#include<iomanip>using namespace std; int main(){ float total_sum=0.0; float money_mon[12]; for(int i=0;i<12;i++) { cin>>money_mon[ 阅读全文
posted @ 2017-01-20 22:22 王坤1993 阅读(132) 评论(0) 推荐(0)
摘要:#include<iostream> #include<string> using namespace std; struct BigReal //高精度实数 { int len; //长度 int num[10000]; int point; //小数点位置 BigReal() { len=1; 阅读全文
posted @ 2017-01-20 22:20 王坤1993 阅读(256) 评论(0) 推荐(0)
摘要:#include<stdio.h> #include<string.h> int main() { int i,n,len,j,k,t; char s1[1005],s2[100]; scanf("%d",&n); getchar(); while(n--) { gets(s1); len=strl 阅读全文
posted @ 2017-01-20 22:18 王坤1993 阅读(301) 评论(0) 推荐(0)
摘要:#include <iostream>#include <cstdio>using namespace std;int mod_exp(int a, int b, int c) //快速幂取余a^b%c{ int res, t; res = 1 % c; t = a % c; while (b) { 阅读全文
posted @ 2017-01-20 22:14 王坤1993 阅读(145) 评论(0) 推荐(0)
摘要:#include<stdio.h>#include<math.h>int main(){ __int64 cas,b,i,d; double a,m,n,c; scanf("%I64d",&cas); for(i=1;i<=cas;i++) { scanf("%lf",&n); a=n*log10( 阅读全文
posted @ 2017-01-20 22:12 王坤1993 阅读(131) 评论(0) 推荐(0)