![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数学
wenbo201
这个作者很懒,什么都没留下…
展开
-
矩形面积相交
基础练习 矩形面积交 时间限制:1.0s 内存限制:512.0MB 问题描述 平面上有两个矩形,它们的边平行于直角坐标系的X轴或Y轴。对于每个矩形,我们给出它的一对相对顶点的坐标,请你编程算出两个矩形的交的面积。 输入格式 输入仅包含两行,每行描述一个矩形。 在每行中,给出矩形的一对相对顶点的坐标,每个原创 2017-07-06 09:15:16 · 266 阅读 · 0 评论 -
矩阵快速幂
用 fib(n)fib(n) 表示斐波那契数列的第 nn项,现在要求你求 fib(n)fib(n) mod mm。fib(1)=1,fib(2)=1fib(1)=1,fib(2)=1。输入格式输入 22 个整数 n(1 \le n \le 10^{18})n(1≤n≤1018),m(2 \le m \le 100000000)m(2≤m≤100000000)。输出格式输出 fib(n)fib(n)...原创 2018-03-06 11:57:44 · 141 阅读 · 0 评论 -
扩展欧几里得算法
C. Linetime limit per test 1 secondmemory limit per test 256 megabytesinput standard inputoutput standard outputA line on the plane is described by an equation原创 2017-10-10 22:29:56 · 248 阅读 · 0 评论 -
leftmost digit
C - Leftmost DigitTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1060DescriptionGiven a positive integer N, you should out原创 2017-07-08 15:49:12 · 502 阅读 · 0 评论 -
多校联萌 C-QAQ & 火星情报局
1410: QAQ & 火星情报局 [数学]时间限制: 1 Sec 内存限制: 128 MB提交: 242 解决: 35 统计题目描述QAQ~超级喜欢看火星情报局,每周六都是他一周中最期待的一天,QAQ喜欢和自己一样心愿是“世界和平”的薛之谦,喜欢“一言不合就飙车”的宇哥,喜欢“再扯的提案都能升华为鸡汤”的汪涵局长....当然也喜欢的里面各种各样奇葩有趣的提原创 2017-08-11 21:26:54 · 514 阅读 · 0 评论 -
Is Derek lying?-2017 暑期组队训练赛1-HDU-
DerekDerek and AlfiaAlfia are good friends.DerekDerek is Chinese,and AlfiaAlfia is Austrian.This summer holiday,they both participate in the summer camp of Borussia Dortmund.During the summer ca原创 2017-08-03 22:27:13 · 308 阅读 · 0 评论 -
高精度计算
#include<cstdio> #include<cstring> using namespace std;const int N=2e3+10;char s1[N],s2[N];int p,a1[N],a2[N],a3[N],a4[N];inline bool bi(int a[],int b[]){//高精度除法 if(a[0]<b[0])...原创 2017-07-09 20:08:09 · 259 阅读 · 0 评论 -
gcd
#include#include#includeint gcd(int x,int y){ if(x%y==0) return y; else return gcd(y,x%y);}int main(){ int m,n; while(~scanf("%d%d",&n,&m)) { printf("%d\n",(n*m)/gcd(n,m)); }}//求最小公倍原创 2017-07-08 21:07:46 · 164 阅读 · 0 评论 -
负进制
C - Weird NumbersTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 1887DescriptionBinary numbers form the principal basis of原创 2017-07-08 15:53:24 · 613 阅读 · 0 评论 -
素数筛法
A B C D E F G H I JJ - Largest prime factorTime Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2136DescriptionEverybody k原创 2017-07-07 08:55:02 · 248 阅读 · 0 评论 -
快速求质因数
#include <bits/stdc++.h>using namespace std;int vis[1000010];const int mod=1e9+7;int main(){ long long n,m,i,j; while(~scanf("%d%d",&n,&m)) { //memset(vis,0,sizeof(v...原创 2019-04-04 11:12:48 · 1470 阅读 · 0 评论