提交记录 19742


用户 题目 状态 得分 用时 内存 语言 代码长度
stargazer test. 自定义测试 Accepted 100 25.54 ms 56020 KB C++ 1.71 KB
提交时间 评测时间
2023-07-28 11:56:56 2023-09-03 19:42:38
#include<bits/stdc++.h>
using namespace std;
#define cs const
#define re register
#define pb push_back
#define pii pair<int,int>
#define ll long long
#define y1 shinkle
#define fi first
#define se second
#define bg begin
#define gc getchar
inline int read(){
    char ch=gc();
    int res=0;bool f=1;
    while(!isdigit(ch))f^=ch=='-',ch=gc();
    while(isdigit(ch))res=(res+(res<<2)<<1)+(ch^48),ch=gc();
    return f?res:-res;
}
inline ll readll(){
    char ch=gc();
    ll res=0;bool f=1;
    while(!isdigit(ch))f^=ch=='-',ch=gc();
    while(isdigit(ch))res=(res+(res<<2)<<1)+(ch^48),ch=gc();
    return f?res:-res;
}
inline int readstring(char *s){
	int top=0;char ch=gc();
	while(isspace(ch))ch=gc();
	while(!isspace(ch)&&ch!=EOF)s[++top]=ch,ch=gc();
	s[top+1]='\0';return top;
}
template<typename tp>inline void chemx(tp &a,tp b){a=max(a,b);}
template<typename tp>inline void chemn(tp &a,tp b){a=min(a,b);}

cs int L=1e7,N=1000005;
cs ll inf=1e18;

ll sl[N],sv[N],v[N];
vector<ll> Slope,F,P;
signed main(){
 //   freopen("1.in","r",stdin);
    int t=1428133,n=38;
    int len=t/n,Ans;
    int tot=0;
    ll sm=0,slope=0,lst=0;
   
    while(n--){
        for(int i=1;i<=len;i++)sl[i]=rand(),sv[i]=rand(),v[i]=rand();
         int tt=clock();
        for(int i=1;i<=len;i++){
            if(sl[i]||sv[i]){
                 sm+=slope*(v[i]-lst)+sv[i];
                 slope+=sl[i];

                 P.emplace_back(v[i]),
                 F.emplace_back(sm),
                 Slope.emplace_back(slope);

                sl[i]=sv[i]=0;
                lst=v[i];
            }
        }
        Ans+=sm*slope;
        Ans+=P.back()*F.back()*Slope.back();
        tot+=clock()-tt;
    }
    cerr<<tot<<'\n';
}
//total:25
//total:40
//1:12~13
//2:20~30

CompilationN/AN/ACompile OKScore: N/A

Testcase #125.54 ms54 MB + 724 KBAcceptedScore: 100


Judge Duck Online | 评测鸭在线
Server Time: 2025-09-14 18:40:34 | Loaded in 0 ms | Server Status
个人娱乐项目,仅供学习交流使用 | 捐赠