提交记录 21356


用户 题目 状态 得分 用时 内存 语言 代码长度
lotus_f test. 自定义测试 Accepted 100 277.953 ms 19568 KB C++14 317 B
提交时间 评测时间
2024-03-01 21:51:26 2024-03-01 21:51:28
#include<bits/stdc++.h>
using namespace std;
int n=5e6,a[5000010];
int main()
{
	for(int i=1; i<=n; ++i) a[i]=i;
	long long sum=0;
	for(int i=1; i<=n; ++i)
	{
		int el=1,er=n,ans,mid;
		while(el<=er)
		{
			mid=el+er>>1;
			if(a[mid]>=i) ans=mid,er=mid-1;
			else el=mid+1;
		}
		sum+=ans;
	}
	cout<<sum;
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1277.953 ms19 MB + 112 KBAcceptedScore: 100


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