lightoj 1109 struct is good
来源:互联网 发布:linux下svn测试 编辑:程序博客网 时间:2024/05/22 02:16
#include<stdio.h>#include<algorithm>using namespace std;struct P{int num;int count;bool operator < (const P &o) const{if(count==o.count)return num>o.num;return count<o.count;}};P n[1500];int main(){for(int i=1;i<=1000;i++){n[i].num=i;n[i].count=0;}for(int i=1;i<=1000;i++){for(int j=i;j<=1000;j++){if(j%i==0)n[j].count++;}}sort(n+1,n+1001);int cas;scanf("%d",&cas);for(int T=1;T<=cas;T++){int q;scanf("%d",&q);printf("Case %d: %d\n",T,n[q].num);}return 0;}
- lightoj 1109 struct is good
- LightOJ 1051 Good or Bad
- LightOJ 1051 Good or Bad
- The feeling is good
- How Good Is Goodmail?
- Greedy is Good
- Now is good
- Noise is good
- B. Different is Good
- Red is good (DP)
- [HbFS-]Red is good
- [HbFS-]Red is good
- oj_470 Red is good
- bzoj1419: Red is good
- Bzoj1419 Red is good
- Red is good
- LightOJ 1051 Good or Bad 解题报告
- LightOJ - 1051 Good or Bad(扫描)
- 算法2013110901
- 利用Andriod死亡通知机制告诉service,client被kill了
- Eclipse的配置与使用
- c_str()
- iOS 7用户界面过渡指南
- lightoj 1109 struct is good
- window端口占用解决
- OGRE学习(3)
- WindowForms调用系统默认程序打开文件
- Amazon Simple Storage Service (Amazon S3)
- 现在要开始我的ACM之旅啦!
- Java 排序
- SERVLET
- 代理说明