HDU 4951
来源:互联网 发布:淘宝 排名 编辑:程序博客网 时间:2024/05/21 17:40
诶。。不知道为什么t了,原先也是一直在个位上找规律,没有发现十位上的区别。
#include <stdio.h>#include <iostream>#include <algorithm>#define maxn 10000using namespace std;int main(){ int n; int cas=0; while(scanf("%d",&n)!=EOF) { int i,j,k; int ge[maxn],shi[maxn],aim[maxn]; for(i=0;i<n;i++) { for(j=0;j<n;j++) scanf("%d%d",&shi[j],&ge[j]); sort(shi,shi+n); int tmp=1; for(j=1;j<n;j++) if(shi[j]!=shi[j-1]) tmp++; if(tmp!=1) aim[tmp]=i; else { int ans=1; sort(ge,ge+n); for(j=1;j<n;j++) if(ge[j]!=ge[j-1]) ans++; if(ans!=1) aim[1]=i; else aim[0]=i; } } printf("Case #%d: ",++cas); for(i=0;i<n;i++) printf("%d ",aim[i]); printf("\n"); } return 0;}
0 0
- HDU 4951
- 2014多校联合八(HDU 4945 HDU 4946 HDU 4948 HDU 4950 HDU 4951 HDU 4952)
- HDU 4951 Multiplication table
- HDU-4951-Multiplication table
- hdu 4951 Multiplication table
- HDU 4951 Multiplication table
- Hdu 4951 Multiplication table
- hdu
- hdu
- HDU
- hdu ()
- hdu
- hdu
- HDU
- HDU
- hdu
- hdu
- HDU
- 编辑文章 - 博客频道 - CSDN.NET
- hdu 2204
- hdu1253BFS入门
- HNU12884_Area Coverage(扫描线/线段树+离散化)
- 在汉澳sinox2014建立ZFS高可靠文件存储系统
- HDU 4951
- windows编程--动态加载光标和图标
- JSON学习
- PHP注释以及各种语言的注释
- Objective-c 文件的基本操作
- VisualGDB调试
- Android权限之sharedUserId和签名
- javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
- 学习资源汇总