提交记录 21358


用户 题目 状态 得分 用时 内存 语言 代码长度
lotus_f test. 自定义测试 Accepted 100 267.715 ms 19568 KB C++14 301 B
提交时间 评测时间
2024-03-01 21:53:07 2024-03-01 21:53:09
#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;
		while(el<er)
		{
			int mid=el+er>>1;
			if(a[mid]>=i) er=mid;
			else el=mid+1;
		}
		sum+=el;
	}
	cout<<sum;
	return 0;
}

CompilationN/AN/ACompile OKScore: N/A

Testcase #1267.715 ms19 MB + 112 KBAcceptedScore: 100


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