首页
学习
活动
专区
工具
TVP
发布

wym

专栏作者
404
文章
301894
阅读量
27
订阅数
引用调用 (c/c++)
标准c语言 引用调用  #include <stdlib.h> #include <stdio.h> void f(int *t) { (*t)++;//注意运算优先级 } int main() { int t; t=0; f(&t); printf("%d",t); return 0; } c++引用调用 #include <iostream> #include <algorithm> #include <string> #include <queue> #include <map
用户2965768
2018-10-11
3090
How Many Trees?
//j=0表示位数,j从1到ans[i][0]是个位数往上
用户2965768
2018-08-30
4100
HDU 1052 Tian Ji -- The Horse Racing
http://acm.hdu.edu.cn/showproblem.php?pid=1052 题意:给一个n是双方的马匹数,第一行是田忌的马,第二行是齐王的马, 赢了赚200两银子,输了输两百两,平局
用户2965768
2018-08-30
5000
HDU 1061
http://acm.hdu.edu.cn/showproblem.php?pid=1061 题意:求N的N次方是多少。 题解: (a*b)%m=((a%m)*(b%m))%m #include <i
用户2965768
2018-08-30
4150
hdu1007平面最近点对分治
分治即可,对N对点对,求中间值,mid。按照横坐标升序排列,递归求出0到mid以及mid+1到N-1对点的最小距离。
用户2965768
2018-08-30
6140
模板--LIS
#include <iostream> #include <cstring> using namespace std; const int N=500010; int a[N],dp[N]; int n; int LIS() { dp[1]=a[1]; int len=1; for(int i=2;i<=n;i++) { int left=1; int right=len; while(left<=right)
用户2965768
2018-08-30
3410
Big Number hdu1018
#include <iostream> #include <cmath> using namespace std; const double pi=acos(-1.0); const double e = 2.718281828459; int main() { long long n,m,res; scanf("%lld",&n); while(n--) { scanf("%lld",&m);    res=log10(2*pi*m)/2+m*(log10(m/e))+1; printf("%lld\n",res);  } return 0; }
用户2965768
2018-08-30
2700
HDU 2570 迷瘴
http://acm.hdu.edu.cn/showproblem.php?pid=2570 #include <iostream> #include <bits/stdc++.h> using
用户2965768
2018-08-30
4100
Calculate e hdu 1016
#include<iostream> using namespace std; int main() {   double i,a=1,n,t=1;    printf("n e\n- -----------\n0 1\n1 2\n2 2.5\n");   for(i=1;i<10;i++) { t=t*i;  n=1/t; a+=n; if(i>2) printf("%.0lf %.9lf\n",i,a); }   return 0; } 
用户2965768
2018-08-30
2680
Digital Roots hdu1013
每次每位数相加所得到的数即在原基础上减去若干个9 #include <iostream> #include <string> using namespace std; int main() { s
用户2965768
2018-08-30
3390
陕西师范大学第七届程序设计竞赛网络同步赛 iko和她的糖
dp[i][j]=max(dp[i][j],dp[i-1][j]-b[i-1]);
用户2965768
2018-08-30
3040
HDU 1392 Surround the Trees(计算几何--凸包)
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1392 题意:计算凸包并求周长 题解;见代码 #include <iostream> #include <a
用户2965768
2018-08-30
3630
lower_bound()函数详解
 lower_bound()返回值是一个迭代器,返回指向比key大的第一个值的位置
用户2965768
2018-08-30
1.6K0
HDU 6354 Everything Has Changed
#include <iostream> #include <cmath> #define PI (acos(-1.0)) using namespace std; int main() { int t; scanf("%d", &t); while (t--) { int n, R, a, b, c; double r, sum = 0; scanf("%d%d", &n, &R); sum = PI * 2 *
用户2965768
2018-08-30
4710
HDU 6114 Chess
 题目:http://acm.hdu.edu.cn/showproblem.php?pid=6114 题意:要求一个棋盘放最多的车,并求下一个车在上一个车的右下方 题解:设长边为n,短边为m,则最多放
用户2965768
2018-08-30
3150
2018 Multi-University Training Contest 6 oval-and-rectangle
#include<stdio.h> #include<iostream> #include<math.h> using namespace std; #define PI (acos(-1.0)) int main() { int t; double a, b; scanf("%d", &t); while (t--) { scanf("%lf%lf", &a, &b); double sum = a * PI + 2 * b;
用户2965768
2018-08-30
2550
逆元求组合数----模板
#include <stdio.h> #include <iostream> using namespace std; const int MOD=998244353; const int MAXN=202020; int fac[MAXN],facinv[MAXN]; long long quickmul(int a,int b) { long long ret=1; for(; b ; b >>=1 ,a =(long long) a * a % MOD) if((b & 1)) re
用户2965768
2018-08-30
5740
牛客练习赛24
A石子列阵(快速幂取模) 第一个位置可以有m种选择,其他每个位置m-1种 #include<stdio.h> #include<algorithm> #include<cmath> #include<iostream> using namespace std; const int mod = 1e9 + 7; long long quick_power(long long a, long long n) { long long ans = 1; while (n != 0) { if (n & 1
用户2965768
2018-08-30
2480
Least Common Multiple hdu 1019
题意:求多个数的最小公倍数,两两求即可。   注意数据范围,32字节 2^32 . int是16字节的。 #include <iostream> #include <cmath> #include <algorithm> #define ll long long using namespace std; ll gcd(ll a,ll b) {     ll t1=max(a,b);    ll t2=min(a,b);    while(b)    { ll tp=a%b;   a=b;
用户2965768
2018-08-30
4330
没有更多了
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
Python精品学习库
代码在线跑,知识轻松学
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档