跳到正文

关志勇

39814

我是Sb,是个元素符号

在洛谷打开
资料、奖项与版本

资料

编号
39814
抓取

奖项

2022 CSP-S
二等奖
2021 CSP-J
二等奖

https://deepmess.com/namerena/#

http://lvmaojun.com/huaji/

https://www.xd0.com/admin/index.html?lang=cn

https://www.luogu.org/discuss/show/30357?page=2

http://hackcode.ishoulu.com/linux/

https://www.luogu.org/space/show?uid=76924\

https://likexia.gitee.io/cat-zh/

https://www.luogu.org/problem/P2791

http://kubitionadvanture.sinaapp.com/

https://www.luogu.com.cn/user/238408

http://47.119.140.90/

LaTeX

generals.io

http://gjyzoj.tpddns.cn:82/

https://www.gamepix.com/

https://idlegame.gitee.io/ng-space-company/

https://jcw87.github.io/c2-sans-fight/

https://www.html5tricks.com/demo/html5-fruit-ninja/index.html

https://www.luogu.com.cn/paste/zp0aw3s8

https://www.xiwnn.com/huaxian

鹾 tg4y64

1932003743 123456

暴力出奇迹,骗分过样例。

数学先打表,DP看运气。

穷举TLE,递推UKE。

模拟MLE,贪心还CE。

想要骗到分,就要有方法。

图论背模板,数论背公式。

动规背方程,高精背代码。

如果都没背,干脆输样例。

代码
2021/9/11 100AC
2021/9/27 二次绿名
2021/11/20 绿勾(迟到的绿勾)
2021/12/11 150AC
2022/3/31 紫题首A
2022/10/29 500提交(csp复赛。)
2022/11/9 150AC

待学习

C++
#include<bits/stdc++.h>
using namespace std;
int T,n,ans,cnt,ccnt;
long long v,a[100010];
int tp0[100010];
bool b,tp1[100010];
int main()
{
    cin>>T;
    while(T--)
    {
        ans=0;
        scanf("%d%lld",&n,&v);
        for(int i=1;i<=n;++i)
        {
            scanf("%lld",&a[i]);
            if(a[i]==0) tp0[++cnt]=i;
            if(a[i]==1) tp1[i]=1;
        }
        tp0[cnt+1]=n;
        for(int k=1;k<=cnt+1;k++)
        {
            for(int i=tp0[k-1]+1;i<=tp0[k];++i)
            {
                b=0;
                long long ji=1;
                for(int j=i;j<=tp0[k];++j)
                {
                    if(b==1)
                    {
                        ans+=(tp0[k]-i);
                        break;
                    }
                    ji*=a[j];
                    if(ji>=v)
                    {
                        ++ans;
                        b=1;
                    }
                }
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}

还没有收录这位用户的文章。