社区讨论
abc200c
AT_abc200_c [ABC200C] Ringo's Favorite Numbers 2参与者 2已保存回复 4
讨论操作
快速查看讨论及其快照的属性,并进行相关操作。
- 当前回复
- 4 条
- 当前快照
- 1 份
- 快照标识符
- @lygzgbxl
- 此快照首次捕获于
- 2024/07/11 16:04 2 年前
- 此快照最后确认于
- 2024/07/11 16:49 2 年前
TLE
CPP#include<bits/stdc++.h>
using namespace std;
const int N=1000010;
int a[N],x,ans;
int main()
{
cin>>x;
for(int i=1;i<=x;i++) cin>>a[i];
for(int i=1;i<=x;i++)
for(int j=i;j<=x;j++)
{
if((abs(a[i]-a[j])%200==0)&&(i!=j)) ans++;
}
cout<<ans;
return 0;
}
回复
共 4 条回复,欢迎继续交流。
正在加载回复...