LonLife 1051 My-graph
来源:互联网 发布:php解析markdown 编辑:程序博客网 时间:2024/05/18 10:18
1051 - My-graph
Time Limit:1s Memory Limit:64MByte
Submissions:350Solved:170
DESCRIPTION
In graph theory, the inverse of a graph GG is a graph HH on the same vertices such that two distinct vertices of HH are adjacent if and only if they are not adjacent in GG.
My-graph is the graph that it's inverse graph is an isomorphism graph of itself.
(This is a example of My-graph has 5 nodes).
Now comes the problem: Do you have a way to make a My-graph that has nn nodes?
INPUT
There are multiple test cases.The first line is a number T (T ≤100T ≤100), which means the number of cases.For each case, one integer n(2≤n≤104)n(2≤n≤104) means the nodes you have initially.
OUTPUT
If you have at least one way to make it , please output "yes".If there is no way, output "no".
SAMPLE INPUT
225
SAMPLE OUTPUT
noyes
SOLUTION
“玲珑杯”ACM比赛 Round #4
#include<stdio.h>#include<string.h>#include<algorithm>using namespace std;int main(){int t,n,m,i,j;scanf("%d",&t);while(t--){scanf("%d",&n);m=n*(n-1)/2;if(m%2)printf("no\n");elseprintf("yes\n");}return 0;}
0 0
- LonLife 1051 My-graph
- 玲珑1051 My-graph
- **1051 - My-graph-同构图
- 【玲珑学院 1051 - My-graph】
- 【玲珑杯 1051】【构造】My-graph
- boost graph libaray: my own note(1)
- Lonlife-ACM 1010 Alarm
- LonLife 1046 chess play
- LonLife 1052 See car
- Lonlife 1057 Private Value
- LonLife 1071 - Boring Game
- Lonlife-ACM Round #7
- LonLife-ACM 1129
- Lonlife 1016 Change of Life
- Lonlife 1056 A plus B
- graph
- Graph
- Graph
- java反射使用场景
- spark 读取mysql数据
- python命令行参数解析模块argparse和docopt
- Sqoop将SqlServer数据导入HDFS
- 内部类相关知识点
- LonLife 1051 My-graph
- HTTP_1.1_ Protocol Parameters
- ubuntu 常见错误
- Servlet中参数获得总结
- poj 1850 Code
- c++ 实现双向链表构造函数,拷贝构造函数,析构函数,输出操作符重载,赋值操作符重载,头插尾插,头删尾删,任意位置插入,任意位置删除,查找等
- Hadoop 基础原理
- MySql索引算法理解析(通俗易懂 只讲Btree)
- LonLife 1052 See car