E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
MUTC
python 调用rust,从Rust函数返回一个字符串到Python
最直接的版本是这样的:uselibc::c_char;usestd::ffi::CString;usestd::mem;#[no_mangle]pubexternfnquery()->*
mutc
_char
LikYu-餘力
·
2022-08-30 13:34
python
调用rust
[BZOJ3513] [
MUTC
2013] idiots - FFT快速傅里叶变换
3513:[
MUTC
2013]idiotsTimeLimit:20SecMemoryLimit:128MBSubmit:373Solved:122[Submit][Status][Discuss]Description
whzzt
·
2020-08-17 04:08
数学
-
多项式及生成函数
Ascending Rating 【单调队列】(2018
MUTC
3)
ProblemA.AscendingRatingTimeLimit:10000/5000MS(Java/Others)MemoryLimit:524288/524288K(Java/Others)TotalSubmission(s):3124AcceptedSubmission(s):1009ProblemDescriptionBeforethestartofcontest,therearenIC
KnightHONG
·
2020-08-15 10:10
2018HDU多校赛题解3
HDU 4671 - Partition(2013
MUTC
5-1009)(整数拆分,五边形数定理)
还是数学知识匮乏,需要用到五边形数定理以后得补充这类知识啊#include#defineLLlonglongLLp[100005];intT,n,t;intmain(){p[0]=1;p[1]=1;p[2]=2;for(inti=3;ii)break;if(j%2==1)p[i]+=p[i-t];elsep[i]-=p[i-t]-1000000007;p[i]%=1000000007;}if(t>
clevermike
·
2020-08-10 15:21
数论+组合数学
MUTC
2 A - Hero 状态压缩dp
HeroTimeLimit:6000/3000MS(Java/Others)MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):1869AcceptedSubmission(s):868ProblemDescriptionWhenplayingDotAwithgod-likerivalsandpig-liketeammembers,you
cyendra
·
2020-07-29 18:05
DP
解题报告
Training
Contest
BZOJ 3513: [
MUTC
2013]idiots FFT
正难则反,首先概率就是\(\frac{合法的方案数}{总的方案数}\)=\(\frac{总的方案数-不合法的方案数}{总的方案数}\),统计不合法的方案数只需要两个较短的边的长度和\(\le\)较长的边,用t[i]表示长度大于等于i的木棍的数量,f[i]为长度为i的木棍的数量,g[i]表示选出两根木棍组成和为i的方案数,很明显g等于f卷上f,注意自己不能卷自己,直接在最后让自己卷自己的方案数减去就
wljss
·
2019-12-08 18:00
2019 HDOJ Multi-University Training Contest Stage 10(杭电多校)
1/*CodeforcesContest2019_
mutc
_102*ProblemC3*Au:SJoshua4*/5#include6#include7#include8#include9#include10
JHSeng
·
2019-08-27 23:00
2019 HDOJ Multi-University Training Contest Stage 9(杭电多校)
1/*CodeforcesContest2019_
mutc
_092*ProblemB3*Au:SJoshua4*/5#include6#include7#include8#include9#include10
JHSeng
·
2019-08-19 17:00
BZOJ 3513 [
MUTC
2013]idiots
题目大意给定nn个长度分别为aiai的木棒,问随机选择33根木棒能够拼成三角形的概率。数据范围对于100%100%的数据,最多100组数据,且满足1⩽n,ai⩽1051⩽n,ai⩽105。题解拼成三角形的充要条件就是满足三角不等式。三角不等式,即在三角形中两边之和大于第三边。考虑到能拼成三角形的条件有些苛刻,这里先计算不能拼成三角形的概率,之后用总方案去减。总方案为:从nn根木棒中选取33根木棒的
linjiayang2016
·
2018-08-08 22:54
FFT
排列组合
容斥原理
【bzoj3513】【
MUTC
2013】【idiots】
3513:[
MUTC
2013]idiotsTimeLimit:20SecMemoryLimit:128MBSubmit:348Solved:111[Submit][Status][Discuss]Description
FZHvampire
·
2016-04-05 07:00
HDU 4611 - Balls Rearrangement(2013
MUTC
2-1001)(数学,区间压缩)
以前好像是在UVa上貌似做过类似的,mod的剩余,今天比赛的时候受baofeng指点,完成了此道题 此题题意:求sum(|i%A-i%B|)(0<i<N-1) A、B的循环节不同时,会有重叠,重叠后的区间里的数的值相等(可以证明,这里不给出了),然后压缩区间端点值,直接求区间和即可 #include <iostream> #include <s
·
2015-11-12 11:13
HDU
HDU 4635 - Strongly connected(2013
MUTC
4-1004)(强连通分量)
t这道题在我们队属于我的范畴,最终因为最后一个环节想错了,也没搞出来 题解是这么说的: 最终添加完边的图,肯定可以分成两个部X和Y,其中只有X到Y的边没有Y到X的边,那么要使得边数尽可能的多,则X部肯定是一个完全图,Y部也是,同时X部中每个点到Y部的每个点都有一条边,假设X部有x个点,Y部有y个点,有x+y=n,同时边数F=x*y+x*(x-1)+y*(y-1),整理得:F=N
·
2015-10-31 11:42
connect
HDU 4649 - Professor Tian(2013
MUTC
5-1007)(概率)
不知道这题算作什么类型的题目,反正很巧妙,队友小杰想了没一会就搞定了 为了学习这种方法,我也搞了搞,其实思路不难想,位运算嘛,只有0和1,而且该位的运算只影响该位,最多20位,一位一位地计算即可,只需要把每位的情况考虑清楚 #include <stdio.h> int a[210]; char op[210]; double p[210]; int
·
2015-10-21 12:36
SSO
HDU 4618 - Palindrome Sub-Array(2013
MUTC
2-1008)(DP)
d(i,j,k)表示左上角坐标为(i,j),k为正方形边长 d(i,j,k)=1,如果d(i+1,j+1,k-2)=0,且上下两个外围的相等且回文,左右两个外围的相等且回文;否则d(i,j,k)=0 d(i,j,0)=1 d(i,j,1)=1 #include <stdio.h> #include <string.h> int a[310][31
·
2015-10-21 10:31
array
rust raw pointer使用方法(4)
4、这儿是继续上一篇往下写,上一篇是把*
mutc
_void指针转成*mutT类型,然后用UFCS来调用,今天是把*
mutc
_void转成*mutSelf来使用,这个其实只需要添加:Sized就可以了,具体代码如下
varding
·
2015-08-28 13:00
self
Rust
mut-Self
raw指针
rust raw pointer使用方法(3)
3、这一篇写个稍微复杂一点的这个例子里的函数接收*
mutc
_void指针,然后把指针转成T类型的p_selfraw指针,再使用rust的UFCS的函数调用方法调用T的方法(T的静态函数就不需要这么复杂了
varding
·
2015-08-27 07:00
Rust
raw指针
UFCS
c-void
rust raw pointer使用方法(1)
1、rawpointer的声明与赋值这个是c_void类型的用法,可以看到c_void类型的变量是没法赋值的,估计是故意被设计成这样防止滥用,只有*constc_void和*
mutc
_void才赋值usestd
varding
·
2015-08-21 10:00
Rust
rawpointer
c-void
一次 Rust 和C语言的混搭
uselibc::size_t; uselibc::{FILE,c_char}; usestd::string; #[repr(C)] pubstructmntent{ mnt_fsname:*
mutc
_char
MtrS
·
2014-11-19 10:00
HDU 4618 - Palindrome Sub-Array(2013
MUTC
2-1008)(DP)
d(i,j,k)表示左上角坐标为(i,j),k为正方形边长d(i,j,k)=1,如果d(i+1,j+1,k-2)=0,且上下两个外围的相等且回文,左右两个外围的相等且回文;否则d(i,j,k)=0d(i,j,0)=1d(i,j,1)=1 #include #include inta[310][310]; boold[310][310][310]; intcheck(intx,inty,in
·
2013-07-28 22:00
array
MUTC
8 E- One hundred layer 单调队列dp
OnehundredlayerTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):1257 AcceptedSubmission(s):467ProblemDescriptionNowthereisagamecalledthenewmandown100thf
cyendra
·
2013-07-25 10:00
MUTC
8 J-The More The Better
TheMoreTheBetterTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2568 AcceptedSubmission(s):668ProblemDescriptionGivenansequenceofnumbers{X1,X2,...,Xn},
cyendra
·
2013-07-25 10:00
MUTC
2013 E-Deque-hdu 4604
DequeTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):786 AcceptedSubmission(s):253ProblemDescriptionToday,theteachergaveAliceextrahomeworkforthegirlwer
cyendra
·
2013-07-24 14:00
MUTC
7 C - Dragon Ball 单调队列dp
DragonBallTimeLimit:3000/1500MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):1680 AcceptedSubmission(s):614ProblemDescriptionSeanhasgotaTreasuremapwhichshowswhenandwheret
cyendra
·
2013-07-24 11:00
MUTC
7 A-As long as Binbin loves Sangsang
AslongasBinbinlovesSangsangTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/32768K(Java/Others)TotalSubmission(s):2053 AcceptedSubmission(s):501ProblemDescriptionBinbinmissesSangsangsomuch.H
cyendra
·
2013-07-24 10:00
MUTC
2013 J-I-number-hdu4608
I-numberTimeLimit:10000/5000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):195 AcceptedSubmission(s):75ProblemDescriptionTheI-numberofxisdefinedtobeanintegery,whichsatis
cyendra
·
2013-07-23 19:00
MUTC
2013 H-Park Visit-hdu4607
ParkVisitTimeLimit:6000/3000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):85 AcceptedSubmission(s):34ProblemDescriptionClaireandherlittlefriend,ykwd,aretravellinginShev
cyendra
·
2013-07-23 19:00
MUTC
3 A - Flowers 树状数组
FlowersTimeLimit:4000/2000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):1829 AcceptedSubmission(s):901ProblemDescriptionAsisknowntoall,thebloomingtimeanddurationvariesb
cyendra
·
2013-06-16 13:00
题解
算法
MUTC
3 D - Cut the cake 最大子矩阵
CutthecakeTimeLimit:6000/3000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):835 AcceptedSubmission(s):308ProblemDescriptionMarkboughtahugecake,becausehisfriendray_sun’sb
cyendra
·
2013-06-15 11:00
题解
dp
MUTC
3 D - Magic Number DP
MagicNumberTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):1113 AcceptedSubmission(s):480ProblemDescriptionTherearemanymagicnumberswhoselengthsarelesst
cyendra
·
2013-06-13 10:00
题解
动态规划
MUTC
3 E - Triangle LOVE 图论/搜索
TriangleLOVETimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):1629 AcceptedSubmission(s):693ProblemDescriptionRecently,scientistsfindthatthereislovebetwe
cyendra
·
2013-06-12 13:00
题解
搜索
图论
MUTC
2 D - Power transmission 最短路
PowertransmissionTimeLimit:10000/5000MS(Java/Others) MemoryLimit:131072/131072K(Java/Others)TotalSubmission(s):1403 AcceptedSubmission(s):533ProblemDescriptionTheprojectWest-Eastpowertransmissio
cyendra
·
2013-06-05 10:00
图论
MUTC
2 E - Save the dwarfs DP?
SavethedwarfsTimeLimit:2000/1000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):934 AcceptedSubmission(s):285ProblemDescriptionSeveraldwarfsaretrappedinadeepwell.Theyaren
cyendra
·
2013-06-02 20:00
题解
dp
MUTC
2 C - Meeting point-2 切比雪夫距离orz
Meetingpoint-2TimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):889 AcceptedSubmission(s):485ProblemDescriptionIthasbeentenyearssinceTJU-ACMestablished.A
cyendra
·
2013-06-02 20:00
题解
MUTC
2 D - Matrix 并查集
MatrixTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1613 AcceptedSubmission(s):606ProblemDescriptionMachineshaveonceagainattackedthekingdomofXions.Th
cyendra
·
2013-06-01 17:00
题解
MUTC
2 B - Meeting point-1 二分
Meetingpoint-1TimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2324 AcceptedSubmission(s):735ProblemDescriptionIthasbeentenyearssinceTJU-ACMestablished.
cyendra
·
2013-06-01 16:00
题解
MUTC
2 A - Hero 状态压缩dp
HeroTimeLimit:6000/3000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):1869 AcceptedSubmission(s):868ProblemDescriptionWhenplayingDotAwithgod-likerivalsandpig-liketeamme
cyendra
·
2013-06-01 16:00
题解
dp
MUTC
1 B - Hourai Jeweled 树形dp?
HouraiJeweledTimeLimit:4000/2000MS(Java/Others) MemoryLimit:163840/163840K(Java/Others)TotalSubmission(s):810 AcceptedSubmission(s):291ProblemDescriptionKaguyaHouraisanwasonceaprincessoftheLunar
cyendra
·
2013-05-30 16:00
题解
MUTC
1 E - Seikimatsu Occult Tonneru 枚举 网络流
SeikimatsuOccultTonneruTimeLimit:12000/6000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1341 AcceptedSubmission(s):313ProblemDescriptionDuringtheworldwar,toavoidtheupc
cyendra
·
2013-05-30 09:00
题解
图论
MUTC
1 D - Matrix 线性代数 网络流
MatrixTimeLimit:4000/2000MS(Java/Others) MemoryLimit:65536/65536K(Java/Others)TotalSubmission(s):825 AcceptedSubmission(s):212ProblemDescriptionLetAbea1*Nmatrix,andeachelementofAiseither0or1.You
cyendra
·
2013-05-29 16:00
图论
MUTC
1 A - Divide Chocolate 方案统计DP
DivideChocolateTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1271 AcceptedSubmission(s):604ProblemDescriptionItiswellknownthatclairelikesdessertverym
cyendra
·
2013-05-29 10:00
dp
MUTC
1 E - Saving Princess claire_ 迷宫搜索
SavingPrincessclaire_TimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):1495 AcceptedSubmission(s):558ProblemDescriptionPrincessclaire_wasjailedinamazebyG
cyendra
·
2013-05-22 11:00
搜索
MUTC
1 B - Holedox Eating STL
HoledoxEatingTimeLimit:4000/2000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2314 AcceptedSubmission(s):780ProblemDescriptionHoledoxisasmallanimalwhichcanbeconsidereda
cyendra
·
2013-05-22 09:00
题解
MUTC
1 A - Clairewd’s message 扩展KMP
Clairewd’smessageTimeLimit:2000/1000MS(Java/Others) MemoryLimit:32768/32768K(Java/Others)TotalSubmission(s):2296 AcceptedSubmission(s):901ProblemDescriptionClairewdisamemberofFBI.Afterseveralyea
cyendra
·
2013-05-22 08:00
字符串
上一页
1
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他