URAL 1349 Farm
Input
Output
Example
input | output |
---|---|
0 |
-1 |
1 |
1 2 3 |
以前一直吐槽费马大定理实在是废,结果今天终于碰着了hhhhh。
这个定理贼简单,大致就是对于n>=3,不存在整数a,b,c使得a^n+b^n=c^n。
然后这就是个水题了hhhhh
(我直接在提交界面写的代码都没编译hhhhh)
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<cmath>
using namespace std;
int n;
int main(){
scanf("%d",&n);
if(!n||n>) puts("-1");
else{
if(n==) puts("1 2 3");
else puts("3 4 5");
}
return ;
}
URAL 1349 Farm的更多相关文章
- SharePoint 2013: A feature with ID has already been installed in this farm
使用Visual Studio 2013创建一个可视web 部件,当右击项目选择"部署"时报错: "Error occurred in deployment step ' ...
- How To Collect ULS Log from SharePoint Farm
We can use below command to collect SharePoint ULS log from all servers in the Farm in PowerShell. M ...
- How To Restart timer service on all servers in farm
[array]$servers= Get-SPServer | ? {$_.Role -eq "Application"} $farm = Get-SPFarm foreach ( ...
- ZOJ 2412 Farm Irrigation
Farm Irrigation Time Limit: 2 Seconds Memory Limit: 65536 KB Benny has a spacious farm land to ...
- nginx+iis、NLB、Web Farm、Web Garden、ARR
nginx+iis实现负载均衡 在win2008R2上使用(NLB)网络负载均衡 NLB网路负载均衡管理器详解 [译文]Web Farm和Web Garden的区别? IIS负载均衡-Applicat ...
- 续并查集学习笔记——Closing the farm题解
在很多时候,并查集并不是一个完整的解题方法,而是一种思路. 通过以下题目来体会并查集逆向运用的思想. Description Farmer John and his cows are planning ...
- SharePoint Error - The current user is not an SharePoint Server farm administrator
错误截图 错误日志 位置:C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\LOGS 主要错误 The c ...
- hdu.1198.Farm Irrigation(dfs +放大建图)
Farm Irrigation Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- 后缀数组 POJ 3974 Palindrome && URAL 1297 Palindrome
题目链接 题意:求给定的字符串的最长回文子串 分析:做法是构造一个新的字符串是原字符串+反转后的原字符串(这样方便求两边回文的后缀的最长前缀),即newS = S + '$' + revS,枚举回文串 ...
随机推荐
- C#语法糖大汇总【转发】
首先需要声明的是“语法糖”这个词绝非贬义词,它可以给我带来方便,是一种便捷的写法,编译器会帮我们做转换:而且可以提高开发编码的效率,在性能上也不会带来损失.这让java开发人员羡慕不已,呵呵. 1. ...
- codevs 1078 最小生成树 kruskal
题目描述 Description 农民约翰被选为他们镇的镇长!他其中一个竞选承诺就是在镇上建立起互联网,并连接到所有的农场.当然,他需要你的帮助. 约翰已经给他的农场安排了一条高速的网络线路,他想把这 ...
- bzoj 4555 [Tjoi2016&Heoi2016]求和 NTT 第二类斯特林数 等比数列求和优化
[Tjoi2016&Heoi2016]求和 Time Limit: 40 Sec Memory Limit: 128 MBSubmit: 679 Solved: 534[Submit][S ...
- MAC地址的介绍(单播、广播、组播、数据收发)
MAC地址组成 网络设备的MAC地址是全球唯一的.MAC地址长度为48比特,通常用十六进制表示.MAC地址包含两部分:前24比特是组织唯一标识符(OUI,OrganizationallyUniqueI ...
- CSS选择器及CSS3新增选择器
转自:http://www.cnblogs.com/libingql/p/4375354.html 1. CSS1定义的选择器 选择器 类型 说明 E 类型选择器 选择指定类型的元素 E#id ID选 ...
- javascript提示抖动实现方法
css代码: <style type="text/css"> #div1{ width:200px; height:200px; background-color:or ...
- 【HDU3853】LOOPS [期望DP]
LOOPS Time Limit: 5 Sec Memory Limit: 64 MB[Submit][Status][Discuss] Description Akemi Homura is a ...
- Node.js 编码转换
Node.js自带的toString()方法不支持gbk,因此中文转换的时候需要加载第三方库,推荐以下两个编码转换库,iconv-lite和encoding. iconv, iconv-l ...
- Swift中的类型属性(静态变量)
http://blog.haohtml.com/archives/15098 Swift中的类型属性(静态变量) Posted on 2014/06/13 类型属性语法 在 C 或 Objective ...
- twitter api取出的日期格式化
import pickle import datetime crate_time_list=[] twitter_id_list=[] twitter_url_list=[] twitter_text ...