zoukankan      html  css  js  c++  java
  • UOJ282 长度测量鸡

    本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作。

    本文作者:ljh2000 
    作者博客:http://www.cnblogs.com/ljh2000-jump/
    转载请注明出处,侵权必究,保留最终解释权!

    题目链接:http://uoj.ac/problem/282

    正解:数学+结论

    解题报告:

      写个搜索就会发现题目有解,当且仅当n<=3,然后就没有然后了...

      科学证明:http://vfleaking.blog.uoj.ac/blog/2292

      

      

    //It is made by ljh2000
    #include <iostream>
    #include <cstdlib>
    #include <cstring>
    #include <cstdio>
    #include <cmath>
    #include <algorithm>
    #include <vector>
    #include <queue>
    #include <complex>
    using namespace std;
    typedef long long LL;
    int n;
    inline int getint(){
        int w=0,q=0; char c=getchar(); while((c<'0'||c>'9') && c!='-') c=getchar();
        if(c=='-') q=1,c=getchar(); while (c>='0'&&c<='9') w=w*10+c-'0',c=getchar(); return q?-w:w;
    }
    
    inline void work(){
    	int T=getint();
    	while(T--) {
    		n=getint();
    		if(n<=3) printf("1
    ");
    		else printf("-1
    ");
    	}
    }
    
    int main()
    {
        work();
        return 0;
    }
    

      

  • 相关阅读:
    sass---基本语法
    sass--概述与基本操作手册
    DOS命令--基本常用命令
    PHP中的几种输出格式
    PHP操控数据库
    MySQL数据库
    前端小知识
    TextView控件的介绍及实现跑马灯的效果
    枚举类型和 struct类型
    Button的四种监听方式
  • 原文地址:https://www.cnblogs.com/ljh2000-jump/p/6357339.html
Copyright © 2011-2022 走看看