hdu5567解题报告/#63 (div.2) 1001
来源:互联网 发布:mp3编辑软件 编辑:程序博客网 时间:2024/04/30 08:23
题目大意:水题,bc的1001,朴素算法即可
#include<cstdio>#include<cstring>#include<algorithm>#include<iostream>#include<cmath>using namespace std;const int maxn=100+10;int a[maxn],n,b,c;int main(){ while(scanf("%d%d%d",&n,&b,&c)!=EOF) { for(int i=1;i<=n;i++) scanf("%d",&a[i]); int cnt=0; for(int i=1;i<=n;i++) for(int j=i+1;j<=n;j++) { if(abs(a[i]-a[j])%b==c) cnt++; } printf("%d\n",cnt); } return 0;}
0 0
- hdu5567解题报告/#63 (div.2) 1001
- Codeforces Round #149 (Div. 2)解题报告
- Codeforces Round #180 (Div. 2) 解题报告
- Codeforces Round #190 (Div. 2) 解题报告
- Codeforces Round #191 (Div. 2) 解题报告
- Codeforces Round #189 (Div. 2) 解题报告
- Codeforces Round #142 (Div. 2) 解题报告
- codeforces #197 div.2解题报告
- codeforces #198 div.2 解题报告
- Codeforces Round #229 (Div. 2) 解题报告
- Codeforces Round #241 (Div. 2) 解题报告
- Codeforces Round #262 (Div. 2)解题报告
- Codeforces Round #267 (Div. 2) 解题报告
- Codeforces Round #266 (Div. 2)解题报告
- Codeforces Round #268 (Div. 2) 解题报告
- Codeforces Round #271 (Div. 2) 解题报告
- Codeforces Round #274 (Div. 2) 解题报告
- Codeforces Round #276 (Div. 2) 解题报告
- iOS开发者遇到审核失败的原因及解决办法
- ie6,ie7常见兼容性问题总结
- js日期时间选择器bootstrap
- Unity3D游戏开发之C++插件接入
- 程序员的10大职业谏言
- hdu5567解题报告/#63 (div.2) 1001
- 在ubuntu上软件安装的几种格式dev,rpm,bin,tar.gz
- JSP基本指令
- Caused by: java.lang.IllegalArgumentException: Can't use FLAG_RECEIVER_BOOT_UPGRADE here的解决
- 通过金矿模型介绍动态规划
- 时间转换,自适应文字高度,手机和邮箱验证
- 在驱动中定义中断
- Codeforces Round #332 (Div. 2) 599A Patrick and Shopping(模拟)
- Kibana User Guide [4.2] » Visualize » Metric