错误AC解法,sort+set判重,为考虑异构!

比较坑的一点是读入时scanf一定要一次读6个数,不然会TLE

#include <set>
#include <map>
#include <cmath>
#include <queue>
#include <vector>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
struct node{
int a,b,c,d,e,f,hash;
node(int a,int b,int c,int d,int e,int f):a(a),b(b),c(c),d(d),e(e),f(f){}
bool operator<(const node&x)const{
if(a==x.a&&b==x.b&&c==x.c&&d==x.d&&e==x.e)return f<x.f;
if(a==x.a&&b==x.b&&c==x.c&&d==x.d)return e<x.e;
if(a==x.a&&b==x.b&&c==x.c)return d<x.d;
if(a==x.a&&b==x.b)return c<x.c;
if(a==x.a)return b<x.b;
return a<x.a;
}
};
set<node>s;
int n,l[]; int main(){
scanf("%d",&n);
for(int i=;i<=n;i++){
scanf("%d%d%d%d%d%d",&l[],&l[],&l[],&l[],&l[],&l[]),sort(l,l+);
node snow=node(l[],l[],l[],l[],l[],l[]);
if(s.find(snow)!=s.end()){puts("Twin snowflakes found.");return ;}
s.insert(snow);
}
puts("No two snowflakes are alike.");
return ;
}

最新文章

  1. js jQuery取消添加超链接的方法小结
  2. eclipse控台不见
  3. KeyValue与KeyData与KeyCode区别(转)
  4. phpMyAdmin 登陆需要密码
  5. CSS之column语法
  6. PHP程序员衰老后的下场
  7. 修改linux多系统启动顺序
  8. Android + OpenCV - Finding extreme points in contours
  9. css的背景background的相关属性
  10. node.js之模块
  11. A* a=new B ,会不会产生内存泄露了,露了B-A的部分?
  12. 深度解密HTTP通信细节
  13. Node.js 应用:Koa2 使用 JWT 进行鉴权
  14. Hibernate 5 入门指南-基于JPA
  15. C - Alphabetic Removals
  16. [LeetCode] 系统刷题3_Binary search
  17. SDP服务搜索流程源码分析
  18. LRU缓存原理
  19. c# base64算法解密
  20. Java线程的阻塞

热门文章

  1. Linux环境搭建及基础操作
  2. git提交时忽略了dll
  3. C++ STL:next_permutation和prev_permutation
  4. SAP 登录Fiori的user和登录WEB UI的business role之间的关系。
  5. centos6离线安装apache2.4
  6. 我的第一个Maven Helloworld
  7. 2.Ubuntu安装 Docker
  8. Appium+python自动化-Android夜神模拟器
  9. LINUX使用SSH远程终端时,如何将运行时间长的程序在后台挂起,下次SSH登陆时继续使用同一个SHELL?
  10. thinkphp中如何用路由调用前台html界面