精华内容
下载资源
问答
  • KX效果3552

    2015-01-05 21:31:03
    3552D的控制台..使用WIN7 32WEI WIN746
  • <p>Clone https://github.com/reactjs/React.NET, checkout b2cd0a4f040da24d1ed2a46d454678fd58c6f8ec, run <code>dev-build.bat</code></p> <h2>Expected behavior <p>It works <h2>Actual behavior <p>Example ...
  • <ul><li>Create a new console application</li><li>Create a folder named <code>D:\Processed</code> within the project directory</li><li>Build the project</li></ul> <h2>Expected behavior <ul><li>...
  • <div><p><img alt="image" src="https://img-blog.csdnimg.cn/img_convert/d3552f4d0854545763d7c3673936c286.png" /></p><p>该提问来源于开源项目:kupiqu/SierraBreezeEnhanced</p></div>
  • Error when run pokeGan.py

    2020-12-25 19:19:27
    <div><p>Hi everyone, ...<p><img alt="error" src="https://img-blog.csdnimg.cn/img_convert/bba73b6ab87d4f3d3552f44245d09d56.png" /></p><p>该提问来源于开源项目:llSourcell/Pokemon_GAN</p></div>
  • 562d346b2000-562d3552a000 rw-p 00000000 00:00 0 [heap] 7f66cc000000-7f66cc021000 rw-p 00000000 00:00 0 7f66cc021000-7f66d0000000 ---p 00000000 00:00 0 7f66d01ff000-7f66d0200000 ---p 00000000 00:00 0...
  • In other words I have to link with <code>target/debug/build/demo-78993d207bfe982b/out/libcxxbridge-demo.a</code> and <code>target/debug/build/cxx-f3cb2e64024d3552/out/libcxxbridge04.a</code>....
  • 0x83d3552c9ca8cfde050f4bb8264ae4923bce3f28", "0x69731f" ], "method": "eth_getBalance" } at background.js:1 at n (background.js:1) at i (background.js:1) at ...
  • <div><h2>The devDependency <a href="https://github.com/rollup/rollup">rollup</a> was ...<code>Fix linting</code></li><li><a href="...2791)</code></li><li><a href="https://urls.greenkeeper.io/rollup/rollup/commit/712c56f131471c2a2e7c2425e6e3f8ad3a989ef8"><code>712c56f</code></a> <code>1.8.0</code></li><li><a href="https://urls.greenkeeper.io/rollup/rollup/commit/f083f50919380bcdeadac158190e13c1d7248218"><code>f083f50</code></a> <code>Update changelog</code></li><li><a href="https://urls.greenkeeper.io/rollup/rollup/commit/dba1438225c3d3552bd306fec5f57332c9b10aed"><code>dba1438</code></a> <code>inline interopDefault in config loading (#2782)</code></li><li><a href=...
  • <ul><li>https://github.com/IntelRealSense/librealsense/issues/3552</li><li>https://github.com/IntelRealSense/librealsense/issues/6112</li></ul><p>该提问来源于开源项目:IntelRealSense/...
  • <p>2019-06-03 08:51:38.322 INFO 3552 --- [ main] c.d.p.d.DubboProviderApplication : Starting DubboProviderApplication v0.0.1-SNAPSHOT on ubuntu-server with PID 3552 (/usr/dubbo/dubbo-provider-0.0.1-...
  • 网络工程师资料 (pdf)

    2010-02-01 16:30:00
    chapter1.pdf http://d.namipan.com/d/4d040fd97874bf09edc1ddc72b980bc64ecae808f2c80000chapter2.pdf http://d.namipan.com/d/8415e531c12792775a7b982b143e6dd3552c3ee6cbe30000chapter3.pdf

     
    chapter1.pdf http://d.namipan.com/d/4d040fd97874bf09edc1ddc72b980bc64ecae808f2c80000
    chapter2.pdf                    http://d.namipan.com/d/8415e531c12792775a7b982b143e6dd3552c3ee6cbe30000
    chapter3.pdf http://d.namipan.com/d/10e60676e8f438fc6c8dd158299de1889ae7a7e38df40100
    chapter4 数据链路层.pdf         http://d.namipan.com/d/c2e08c7cd02cde3f207abda9e19be42af1f5f88ab1ab0500
    chapter5 局域网.pdf http://d.namipan.com/d/8cc2f8ff49c278905b9be6b09b160a3ff09ed2e9d1290400
    chapter6 广域网.pdf             http://d.namipan.com/d/e28010ce487fb8ebb23b384e196e529088333601e53a0100
    chapter7 网络层.pdf http://d.namipan.com/d/c2f4ed96b1bdd549afe6a9e2473390933881d5a63fc80100
    chapter8 传输层.pdf             http://d.namipan.com/d/1456073acd01f6e50e6a28699e32cae7fcd741c9d8da0000
    chapter9 会话层和表示层.pdf                    http://d.namipan.com/d/26de376c7ac757a86e110c1f5a58b8158a313cde90740000
    chapter10 应用层.pdf http://d.namipan.com/d/c4a4b439de3990b8a10da5b36b8bdec1b279766581180100
    chapter11 INTERNET的发展.pdf    http://d.namipan.com/d/ce3a01019a345dd69a10b6db1de4afe90d5ddf778db60200
    chapter12 网络操作系统.pdf http://d.namipan.com/d/a421837e701f24561eb6ad1e663a549dc26be6fe9c940000
    内容简介.txt                    http://d.namipan.com/d/0b50e7b13b26ba520514460ca6508e27a42d26827a030000
    前 言.txt http://d.namipan.com/d/0effe77cb5dfb8cc42ecd30a445c3379cf1e19a216090000
    目录.txt    http://d.namipan.com/d/f8b1b59c5115d68b5b2e5cd870df85c14fe33ce988160000

    展开全文
  • FuDevice using 0703a244275ed772f8e276c4b31389afc296101d for usb:00:03 FuEngine failed to add USB device 2dc8:6002: failed to retrieve from device on ep 0x82: transfer timed out </code></pre> <p>The ...
  • 速度训练4 题解

    万次阅读 2018-09-13 21:33:55
    D E F G http://acm.hdu.edu.cn/showproblem.php?pid=3552 http://codeforces.com/problemset/problem/352/C http://codeforces.com/problemset/problem/448/C http://codeforces.com/problemset...

    文章目录


    T1
    T2
    T3
    T4
    T5
    T6
    T7
    由于时间原因,题目翻译略.

    A

    贪心将给定的二元组按照aa从大到小排序,显然当某个a1a1值在集合里为最大的时候最好的办法就是贪心把所有aa值小于a1a1的二元组全部插入与a1a1相同的集合.
    所以枚举所有a1a1,答案即为a1+maxba1+maxb的最小值.

    #include<bits/stdc++.h> //Ithea Myse Valgulious
    namespace chtholly{
    typedef long long ll;
    #define re0 register int
    #define rec register char
    #define rel register ll
    #define gc getchar
    #define pc putchar
    #define p32 pc(' ')
    #define pl puts("")
    /*By Citrus*/
    inline int read(){
      int x=0,f=1;char c=gc();
      for (;!isdigit(c);c=gc()) f^=c=='-';
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return f?x:-x;
      }
    template <typename mitsuha>
    inline bool read(mitsuha &x){
      x=0;int f=1;char c=gc();
      for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';
      if (!~c) return 0;
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return x=f?x:-x,1;
      }
    template <typename mitsuha>
    inline int write(mitsuha x){
      if (!x) return 0&pc(48);
      if (x<0) x=-x,pc('-');
      int bit[20],i,p=0;
      for (;x;x/=10) bit[++p]=x%10;
      for (i=p;i;--i) pc(bit[i]+48);
      return 0;
      }
    inline char fuhao(){
      char c=gc();
      for (;isspace(c);c=gc());
      return c;
      }
    }using namespace chtholly;
    using namespace std;
    const int yuzu=1e5;
    typedef int fuko[yuzu|10];
    typedef pair<int,int> pii;
    pii a[yuzu|10];
    int main(){
    for (int t=read(),i,zxy=0;t--;){
      int n=read(),llx=2e9,maxb=0;
      for (i=1;i<=n;++i) a[i]=pii(read(),read());
      sort(a+1,a+n+1,greater<pii>());
      a[n+1].first=a[0].second=0;
      for (i=1;i<=n;++i) maxb=max(maxb,a[i-1].second),llx=min(llx,a[i].first+maxb);
      /*maxb是目前的b值的最大值,llx是a+b的最小值.*/
      printf("Case %d: %d\n",++zxy,llx);
      }
    }
    

    B

    题目相当于先将所有数向下取整,再将nn个数变为向上取整.
    dif(x)dif(x)为一个数向上取整的值减向下取整的值.
    显然dif(x)dif(x)xx为整数时取00,否则取11.
    我们将a[i]a[i]difdif值排序,算出a[i]floor(a[i])a[i]-floor(a[i])值的和sumsum.
    那么我们接下来可以贪心,如果sum>0.5sum>0.5我们就给它1-1,否则不变.
    因为一个a[i]a[i]从向下取整变为向上取整,会带来1-1的贡献,由于要让绝对值最小,所以当sum<0sum<0时就不要动它了.
    最后坐等答案出来即可.

    #include<bits/stdc++.h> //Ithea Myse Valgulious
    namespace chtholly{
    typedef long long ll;
    #define re0 register int
    #define rec register char
    #define rel register ll
    #define gc getchar
    #define pc putchar
    #define p32 pc(' ')
    #define pl puts("")
    /*By Citrus*/
    inline int read(){
      int x=0,f=1;char c=gc();
      for (;!isdigit(c);c=gc()) f^=c=='-';
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return f?x:-x;
      }
    template <typename mitsuha>
    inline bool read(mitsuha &x){
      x=0;int f=1;char c=gc();
      for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';
      if (!~c) return 0;
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return x=f?x:-x,1;
      }
    template <typename mitsuha>
    inline int write(mitsuha x){
      if (!x) return 0&pc(48);
      if (x<0) x=-x,pc('-');
      int bit[20],i,p=0;
      for (;x;x/=10) bit[++p]=x%10;
      for (i=p;i;--i) pc(bit[i]+48);
      return 0;
      }
    inline char fuhao(){
      char c=gc();
      for (;isspace(c);c=gc());
      return c;
      }
    }using namespace chtholly;
    using namespace std;
    typedef double db;
    const int aoi=4038;
    typedef db kotori[aoi];
    kotori a,f,c,dif;
    db sum;
    int main(){
    int i,n=read()<<1;
    for (i=1;i<=n;++i){
      scanf("%lf",&a[i]);
      f[i]=floor(a[i]);
      c[i]=ceil(a[i]);
      dif[i]=c[i]-f[i];
      sum+=c[i]-a[i];
      }
    int l=1,r=n;
    sort(dif+1,dif+n+1);
    for (i=1;i<=n>>1;++i){
      sum-=dif[sum>0.5?r--:l++];
      }printf("%.3lf",abs(sum));
    }
    

    C

    高妙的动态规划.
    接下来首先欣赏xhkxhk大佬暴力压行代码.

    #include<bits/stdc++.h>
    int i,j=1,a[5010],f[5010][5010];
    main(){
    	for(std::cin>>i;j<=i;j++)std::cin>>a[j];
    	for(;i;i--)for(j=0;j<i;j++)f[i-1][j]=a[j]<a[i]?std::min(f[i][j]+1,f[i][i]+a[i]-a[j]):f[i][i];
    	std::cout<<**f;
    }
    

    然后介绍介绍标算.
    很明显答案不能大于nn(我一列一列涂肯定能够刚好涂完的吧.)
    然后我们考虑横着涂.
    我们考虑区间[l,r][l,r],找出区间l,rl,r内最小数的位置mm.
    然后我们把[l,r][l,r]的最下方涂a[m]a[m]次,这样要涂的部分转化为[l,m1][m+1,r][l,m-1]和[m+1,r]两个部分.
    而两个部分的高度都下降了a[m]a[m],就能够分治解决问题.
    这样就可以写出dp方程了.

    #include<bits/stdc++.h> //Ithea Myse Valgulious
    namespace chtholly{
    typedef long long ll;
    #define re0 register int
    #define rec register char
    #define rel register ll
    #define gc getchar
    #define pc putchar
    #define p32 pc(' ')
    #define pl puts("")
    /*By Citrus*/
    inline int read(){
      int x=0,f=1;char c=gc();
      for (;!isdigit(c);c=gc()) f^=c=='-';
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return f?x:-x;
      }
    template <typename mitsuha>
    inline bool read(mitsuha &x){
      x=0;int f=1;char c=gc();
      for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';
      if (!~c) return 0;
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return x=f?x:-x,1;
      }
    template <typename mitsuha>
    inline int write(mitsuha x){
      if (!x) return 0&pc(48);
      if (x<0) x=-x,pc('-');
      int bit[20],i,p=0;
      for (;x;x/=10) bit[++p]=x%10;
      for (i=p;i;--i) pc(bit[i]+48);
      return 0;
      }
    inline char fuhao(){
      char c=gc();
      for (;isspace(c);c=gc());
      return c;
      }
    }using namespace chtholly;
    using namespace std;
    const int aoi=5038; /*葵怎么就这么萌啊~*/
    int a[aoi];
    int dfs(int l,int r,int h){
    if (l>r) return 0;
    int m=min_element(a+l,a+r+1)-a;
    return min(r-l+1,dfs(l,m-1,a[m])+dfs(m+1,r,a[m])+a[m]-h);
    /*[l,r]区间涂色的最小次数是r-l+1次.*/
    }
    int main(){
    int i,n=read();
    for (i=1;i<=n;++i) a[i]=read();
    write(dfs(1,n,0));
    }
    

    D

    首先预处理组合数逆元.
    我们对xx求一波前缀和,然后对yy的情况进行dpdp.
    dp[i][j]表示当前考虑到第ii个教室,还有jj人没有分配的方法总数.
    枚举当前有kk人分配到前ii个教室(kk不能超过yy),转移方程为
    dp[i][j]=(dp[i][j]+dp[i-1][j-k]*zuhe(x[i]-j+k,k)%mod)%mod.
    最后用dp[m][x[m]]dp[m][x[m]]乘从没有选择的学生中取x[i]x[i]个学生出来的取法总数即可.
    数组开小了wa了一发.

    #include<bits/stdc++.h> //Ithea Myse Valgulious
    namespace chtholly{
    typedef long long ll;
    #define re0 register int
    #define rec register char
    #define rel register ll
    #define gc getchar
    #define pc putchar
    #define p32 pc(' ')
    #define pl puts("")
    /*By Citrus*/
    inline int read(){
      int x=0,f=1;char c=gc();
      for (;!isdigit(c);c=gc()) f^=c=='-';
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return f?x:-x;
      }
    template <typename mitsuha>
    inline bool read(mitsuha &x){
      x=0;int f=1;char c=gc();
      for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';
      if (!~c) return 0;
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return x=f?x:-x,1;
      }
    template <typename mitsuha>
    inline int write(mitsuha x){
      if (!x) return 0&pc(48);
      if (x<0) x=-x,pc('-');
      int bit[20],i,p=0;
      for (;x;x/=10) bit[++p]=x%10;
      for (i=p;i;--i) pc(bit[i]+48);
      return 0;
      }
    inline char fuhao(){
      char c=gc();
      for (;isspace(c);c=gc());
      return c;
      }
    }using namespace chtholly;
    using namespace std;
    const int mod=1e9+7,_=150;
    ll dp[_][9999],jic[1098]={1},inv[1098];
    int x[_],y[_];
    
    ll kasumi(ll a,ll b=mod-2){
    ll s=1;
    for (;b;b>>=1,a=a*a%mod) if (b&1) s=s*a%mod;
    return s;
    }
    
    ll zuhe(int n,int m){
    return jic[n]*inv[m]%mod*inv[n-m]%mod;
    }
    
    int main(){
    int i,j,k,m=read();
    for (i=1;i<1098;++i) jic[i]=jic[i-1]*i%mod;
    inv[1097]=kasumi(jic[1097]);
    for (i=1096;~i;--i) inv[i]=inv[i+1]*(i+1)%mod; 
    for (i=1;i<=m;++i) x[i]=read()+x[i-1];
    for (i=1;i<=m;++i) y[i]=read();
    memset(dp,0,sizeof dp);
    for (**dp=i=1;i<=m;++i){
      for (j=0;j<=x[i];++j){
        for (k=0;k<=min(j,y[i]);++k){
          dp[i][j]=(dp[i][j]+dp[i-1][j-k]*zuhe(x[i]-j+k,k)%mod)%mod;
    	  }
    	}
      }
    ll ans=dp[m][x[m]];
    for (i=1;i<=m;++i) ans=ans*zuhe(x[m]-x[i-1],x[i]-x[i-1])%mod;
    write(ans);
    }
    

    E

    我们推一下公式.
    假设要求不严格单调递增的序列.不严格单调递减同理,减去所有数都一样的nn种情况即可.
    令构造出的序列为aa,下标是1n1\to n.我们在aa的左边加一个11,右边加一个nn.
    构造b[i]=a[i]a[i1]b[i]=a[i]-a[i-1],则bb序列有n+1n+1项,并且bb序列的所有数之和为n1n-1.
    这种题看起来很像一个隔板法.b1+b2+...+bn+1=n1b_{1}+b_{2}+...+b_{n+1}=n-1.
    由于bb序列可以为00,我们给两边同时加n+1n+1.
    那么就变成了在2×n12\times n -1个空里插nn个板的问题了.

    #include<bits/stdc++.h> //Ithea Myse Valgulious
    namespace chtholly{
    typedef long long ll;
    #define re0 register int
    #define rec register char
    #define rel register ll
    #define gc getchar
    #define pc putchar
    #define p32 pc(' ')
    #define pl puts("")
    /*By Citrus*/
    inline int read(){
      int x=0,f=1;char c=gc();
      for (;!isdigit(c);c=gc()) f^=c=='-';
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return f?x:-x;
      }
    template <typename mitsuha>
    inline bool read(mitsuha &x){
      x=0;int f=1;char c=gc();
      for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';
      if (!~c) return 0;
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return x=f?x:-x,1;
      }
    template <typename mitsuha>
    inline int write(mitsuha x){
      if (!x) return 0&pc(48);
      if (x<0) x=-x,pc('-');
      int bit[20],i,p=0;
      for (;x;x/=10) bit[++p]=x%10;
      for (i=p;i;--i) pc(bit[i]+48);
      return 0;
      }
    inline char fuhao(){
      char c=gc();
      for (;isspace(c);c=gc());
      return c;
      }
    }using namespace chtholly;
    using namespace std;
    const int yuzu=2e5,mod=1e9+7;
    typedef ll fuko[yuzu|10];
    fuko jic={1},inv;
    
    ll kasumi(ll a,ll b=mod-2){
    ll s=1;
    for (;b;b>>=1,a=a*a%mod) if (b&1) s=s*a%mod;
    return s;
    }
    
    ll zuhe(int n,int m){
    return jic[n]*inv[n-m]%mod*inv[m]%mod;
    }
    
    int main(){
    int i,n=read();
    for (i=1;i<=yuzu;++i) jic[i]=jic[i-1]*i%mod;
    for (inv[yuzu]=kasumi(jic[yuzu]),i=yuzu-1;~i;--i) inv[i]=inv[i+1]*(i+1)%mod;
    write((zuhe(2*n-1,n)*2%mod-n+mod)%mod);
    }
    

    F

    dpdp来解决.
    首先预处理组合数.
    dp[i][j][k]dp[i][j][k]表示目前处理到第ii个房间,还有jj个人,最长队伍是kk的概率.
    枚举当前房间进了pp个人,概率是从剩下的人中选择了pp个人,并且他们都进了这个房间的概率.
    dp[i][j-p][max(l,k)]+=dp[i-1][j][k]*c[j][p]*pow(1.0/m,p);
    最后用i=1ndp[m][0][i]×i\sum_{i=1}^{n}dp[m][0][i]\times i求得答案.

    #include<bits/stdc++.h> //Ithea Myse Valgulious
    namespace chtholly{
    typedef long long ll;
    #define re0 register int
    #define rec register char
    #define rel register ll
    #define gc getchar
    #define pc putchar
    #define p32 pc(' ')
    #define pl puts("")
    /*By Citrus*/
    inline int read(){
      int x=0,f=1;char c=gc();
      for (;!isdigit(c);c=gc()) f^=c=='-';
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return f?x:-x;
      }
    template <typename mitsuha>
    inline bool read(mitsuha &x){
      x=0;int f=1;char c=gc();
      for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';
      if (!~c) return 0;
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return x=f?x:-x,1;
      }
    template <typename mitsuha>
    inline int write(mitsuha x){
      if (!x) return 0&pc(48);
      if (x<0) x=-x,pc('-');
      int bit[20],i,p=0;
      for (;x;x/=10) bit[++p]=x%10;
      for (i=p;i;--i) pc(bit[i]+48);
      return 0;
      }
    inline char fuhao(){
      char c=gc();
      for (;isspace(c);c=gc());
      return c;
      }
    }using namespace chtholly;
    using namespace std;
    typedef double db;
    const int _=55;
    db c[_][_],dp[_][_][_];
    int a[_];
    int main(){
    int i,j,k,p;
    for (i=0;i<=_;++i){
      for (j=0;j<=i;++j){
        c[i][j]=!j?1:c[i-1][j-1]+c[i-1][j];
        }
      }
    int n=read(),m=read();
    for (i=1;i<=m;++i) a[i]=read();
    db llx=0;
    memset(dp,0,sizeof dp);
    dp[0][n][0]=1;
    for (i=1;i<=m;++i){
      for (j=0;j<=n;++j){
        for (p=0;p<=j;++p){
          for (k=0;k<=n;++k){
            int l=ceil(p*1.0/a[i]);
            dp[i][j-p][l>k?l:k]+=dp[i-1][j][k]*c[j][p]*pow(1.0/m,p);
    	    }
          }
        }
      } 
    for (i=1;i<=n;++i) llx+=dp[m][0][i]*i;
    printf("%.18lf",llx);
    }
    

    G

    把这些区间离散化后差分,算每一个最小区间被包括了几次.
    如果被包括的次数xkx\geq k,答案即加上长度乘上C(x,k)C(x,k)的值.

    #include<bits/stdc++.h> //Ithea Myse Valgulious
    namespace chtholly{
    typedef long long ll;
    #define re0 register int
    #define rec register char
    #define rel register ll
    #define gc getchar
    #define pc putchar
    #define p32 pc(' ')
    #define pl puts("")
    /*By Citrus*/
    inline int read(){
      int x=0,f=1;char c=gc();
      for (;!isdigit(c);c=gc()) f^=c=='-';
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return f?x:-x;
      }
    template <typename mitsuha>
    inline bool read(mitsuha &x){
      x=0;int f=1;char c=gc();
      for (;!isdigit(c)&&~c;c=gc()) f^=c=='-';
      if (!~c) return 0;
      for (;isdigit(c);c=gc()) x=(x<<3)+(x<<1)+(c^'0');
      return x=f?x:-x,1;
      }
    template <typename mitsuha>
    inline int write(mitsuha x){
      if (!x) return 0&pc(48);
      if (x<0) x=-x,pc('-');
      int bit[20],i,p=0;
      for (;x;x/=10) bit[++p]=x%10;
      for (i=p;i;--i) pc(bit[i]+48);
      return 0;
      }
    inline char fuhao(){
      char c=gc();
      for (;isspace(c);c=gc());
      return c;
      }
    }using namespace chtholly;
    using namespace std;
    const int yuzu=4e5,mod=1e9+7;
    typedef ll fuko[yuzu|10];
    fuko sum,jic={1},inv,l,r,li;
    ll kasumi(ll a,ll b=mod-2){
    ll s=1;
    for (;b;b>>=1,a=a*a%mod) if (b&1) s=s*a%mod;
    return s;
    }
    ll zuhe(int n,int m){
    return jic[n]*inv[m]%mod*inv[n-m]%mod;
    }
    int main(){
    int cnt=0,i,n=read(),k=read();
    for (i=1;i<=yuzu;++i) jic[i]=jic[i-1]*i%mod;
    inv[yuzu]=kasumi(jic[yuzu]);
    for (i=yuzu-1;~i;--i) inv[i]=inv[i+1]*(i+1)%mod;
    for (i=1;i<=n;++i){
      l[i]=read(),r[i]=read();
      li[cnt++]=l[i],li[cnt++]=++r[i];
      }
    sort(li,li+cnt);
    cnt=unique(li,li+cnt)-li;
    #define lb lower_bound
    for (i=1;i<=n;++i){
      ++sum[lb(li,li+cnt,l[i])-li];
      --sum[lb(li,li+cnt,r[i])-li];
      }
    ll llx=0,nk=sum[0];
    for (i=1;i<=cnt;++i){
      if (nk>=k) llx=(llx+zuhe(nk,k)*(li[i]-li[i-1])%mod)%mod; nk+=sum[i]; 
      }write(llx);
    }
    

    谢谢大家.

    展开全文
  • <div><p><img width="930" alt="C3D742DF-E1E7-43FE-9A5F-3552BA847A6D" src="https://user-images.githubusercontent.com/890676/74723532-b6d0a600-5275-11ea-94f1-2f11f8a8c115.png" /></p> <p>hi, everyone! I ...
  • 图文并茂的详细教程地址:https://wenku.baidu.com/view/3552b65d42323968011ca300a6c30c225801f041 打开~/.vimrc文件从到最后添加如下内容,如果没有该文件则在家目录下创建该文件。 set fileencodings=utf-8,ucs...

    图文并茂的详细教程地址:https://wenku.baidu.com/view/3552b65d42323968011ca300a6c30c225801f041

    打开~/.vimrc文件从到最后添加如下内容,如果没有该文件则在家目录下创建该文件。

    set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
    set termencoding=utf-8
    set encoding=utf-8

    如果添加如下内容后,在xshell下使用vim打开的文件依然不支持中文的话,那么此时需要需要xshll的设置。

    本人自己的.vimrc的全部设置如下:

    "syntax enable
    syntax on


    "设置配色方案
    "colorscheme pablo


    ""可以在buffer的任何地方使用鼠标
    "set mouse=a
    "set selection=exclusive
    "set selectmode=mouse,key


    "高亮显示匹配的括号
    set showmatch


    "set cursorline
    "去掉vi一致性
    set nocompatible


    "设置缩进
    set expandtab
    set tabstop=4
    set softtabstop=4
    set shiftwidth=4
    set autoindent
    set cindent


    "打开文件类型自动检测功能
    filetype on
    "显示行号
    "set nu
    "搜索高亮
    set hlsearch
    set showmatch
    set nobackup
    set nowrap
    "syntax enable
    syntax on


    "设置配色方案
    "colorscheme pablo


    ""可以在buffer的任何地方使用鼠标
    "set mouse=a
    "set selection=exclusive
    "set selectmode=mouse,key


    "高亮显示匹配的括号
    set showmatch


    "set cursorline
    "去掉vi一致性
    set nocompatible


    "设置缩进
    set expandtab
    set tabstop=4
    set softtabstop=4
    set shiftwidth=4
    set autoindent
    set cindent


    "打开文件类型自动检测功能
    filetype on
    "显示行号
    "set nu
    "搜索高亮
    set hlsearch
    set showmatch
    set nobackup
    set nowrap
    set noswapfile
    set ai
    set si
    set cindent


    set autoread




    if has("cscope")
        set csprg=/usr/bin/cscope
        set csto=0
        set cst
        set csverb
        set nocscopeverbose
        set cspc=3
        if filereadable("cscope.out")
            cs add cscope.out
        else
            let cscope_file=findfile("cscope.out",".;")
            let cscope_pre=matchstr(cscope_file, ".*/")
            if !empty(cscope_file) && filereadable(cscope_file)
                exe "cs add" cscope_file cscope_pre
            endif
        endif
    endif


    set fileencodings=utf-8,ucs-bom,gb18030,gbk,gb2312,cp936
    set termencoding=utf-8
    set encoding=utf-8
    nmap w=  :resize +30<CR>
    nmap w-  :resize -30<CR>
    nmap w,  :vertical resize -50<CR>
    nmap w.  :vertical resize +50<CR>



    展开全文
  • <div><p>Try to withdraw any ...<img alt="selection_078" src="https://img-blog.csdnimg.cn/img_convert/3af7eb3a3552d97f4c678b4d2258c69f.png" /></p><p>该提问来源于开源项目:openware/peatio</p></div>
  • 在1~40km的无标度区间,金银矿床的空间分形丛集和分形密度分布具有良好的分形分维特征,且金银矿床的分形丛集分布存在2个无标度区间1.25~10km(分维值D=0.3552)和10~160km(分维值D=1.2418),反映了金银矿化和控矿容矿...
  • <div><p>Caused by https://github.com/webcompat/webcompat.com/commit/c4b52e63695c01acf71141ba72dbcf3fe1541684#diff-d78febd34e89b24b3552d063128eb28aR6</p> <pre><code> .wc-CSSFixme-resultat strong { ...
  • <p>https://github.com/CodeClub/scratch-curriculum/commit/8e88dab7b69289d818e690a09d0c94c6a3552e9f</p> <p>any ideas what could be wrong? cc </p><p>该提问来源于开源项目:RaspberryPiFoundation/...
  • https://github.com/docker/swarmkit/compare/49a9d7f6ba3c1925262641e694c18eb43575f74b...11d7b06f48bc1d73fc6d8776c3552a4b11c94301</p> <p>CLI vendoring is also updated, but did not bring in changes</p><p...
  • <img alt="image" src="https://img-blog.csdnimg.cn/img_convert/d0e3779a3552bc76e2b4b35d69e23af9.png" /> <p>Regex-Function not working! Blocked Domains still resolved!</p><p>该提问来源于开源项目:...
  • <div><p>Добрый день. Инструмент не рабо...<p><img alt="2017-07-20 19_13_51-rutracker org" src="https://img-blog.csdnimg.cn/img_convert/4b54d499877b3552d9541921f83b25af.png" /> ...
  • #4 0x00007f79b494d0d6 in zif_tideways_span_annotate (execute_data=0x7f79b5016f80, return_value=0x7f79b5016f70) at /var/www/html/php-profiler-extension/tideways.c:4241 #5 0x000055ce8c5660a0 in...
  • <img alt="_2018-11-19_19-21-31" src="https://img-blog.csdnimg.cn/img_convert/d18fd1c3d92d5e62ad31dff4d172e38a.png" /> <p><img alt="_2018-11-19_19-24-46" src=...
  • <div><p>I am from Face team and recently updated the latest Face Swagger by Azure/azure-rest-api-specs#3552. <p>As you can see from the endpoint change ...
  • <div><p>According to ...<img alt="image" src="https://user-images.githubusercontent.com/3315274/35918526-14398490-0c4d-11e8-85ea-6fdabc9a3552.png" /> <p>But if I change the ouput value to number type, ...
  • Light levels broken

    2020-12-02 04:47:13
    <div><p>Edits made with FAWE installed don'...Latest Spigot 1.9.4 (git-Spigot-798f32d-0cd0397) <p>Thanks for your time.</p><p>该提问来源于开源项目:boy0001/FastAsyncWorldedit</p></div>
  • IOS 10.3 beta 2

    2020-12-02 13:17:33
    0x0a464c6962726172792f4170706c69636174696f6e20537570706f72742f476f6f676c652f4368726f6d652f44656661756c742f416666696c696174696f...d697a327274917150fcdbf52984e1a36c23d9f0d2cc5c3552f07c051fc0000000000007000...
  • (D:\Users\Kishan\Documents\Projects\tara\dist\main\main.js:3552:3) at Module._compile (module.js:571:32) </anonymous></anonymous></code></pre> <p>Please note that this is my second ...

空空如也

空空如也

1 2 3 4 5 ... 10
收藏数 191
精华内容 76
关键字:

d3552