随便判了几个条件就过了,也不知道对不对的。

正解应该是:

$[1].$${s_1} + {s_2} + {s_3} + ...... + {s_n} = n(n - 1)$

$[2].$${s_1} + {s_2} + {s_3} + ...... + {s_i} ≥ i(i - 1)$

#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<iostream>
using namespace std;
typedef long long LL;
const double pi=acos(-1.0),eps=1e-;
void File()
{
freopen("D:\\in.txt","r",stdin);
freopen("D:\\out.txt","w",stdout);
}
template <class T>
inline void read(T &x)
{
char c=getchar(); x=;
while(!isdigit(c)) c=getchar();
while(isdigit(c)) {x=x*+c-''; c=getchar();}
} const int maxn=;
int T,n,m,sum,a[maxn]; int main()
{
while(~scanf("%d",&T))
{
while(T--)
{
scanf("%d",&n); sum=; m=;
for(int i=;i<=n;i++) scanf("%d",&a[i]),sum=sum+a[i]; if(sum!=n*(n-)) { printf("F\n"); continue; } bool fail=;
for(int i=;i<=n;i++) if(a[i]>*(n-)) fail=;
if(fail) { printf("F\n"); continue; } printf("T\n");
}
}
return ;
}

HDU 5873 Football Games的更多相关文章

  1. HDU 5873 Football Games 【模拟】 (2016 ACM/ICPC Asia Regional Dalian Online)

    Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)To ...

  2. HDU 5873 Football Games(竞赛图兰道定理)

    http://acm.hdu.edu.cn/showproblem.php?pid=5873 题意: 现在有比赛,所有队伍两两进行比赛,赢的积2分,输的积0分,如果平局的话就各自都积1分,现在给出每只 ...

  3. 16年大连网络赛 1006 Football Games

    题目链接:http://acm.hdu.edu.cn/contests/contest_showproblem.php?cid=725&pid=1006 Football Games Time ...

  4. 2016 ACM/ICPC Asia Regional Dalian Online 1006 /HDU 5873

    Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)To ...

  5. HDU5873:Football Games

    题目链接: Football Games 分析: 先将分数排序,然后 设当前队编号为p,设个指针为p+1,然后p>1,每次p-=2,指针右移一位p==1,指针指向的队-=1p==0,从指针开始到 ...

  6. 2016大连网络赛 Football Games

    Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) P ...

  7. 2016 ACM/ICPC Asia Regional Dalian Online Football Games

    Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)To ...

  8. Football Games(思维题)

    Problem Description A mysterious country will hold a football world championships---Abnormal Cup, at ...

  9. 大连网络赛 1006 Football Games

    //大连网络赛 1006 // 吐槽:数据比较水.下面代码可以AC // 但是正解好像是:排序后,前i项的和大于等于i*(i-1) #include <bits/stdc++.h> usi ...

随机推荐

  1. 【ios开发】控件细究1:UITableView

    工作了将近两个月,共接手两个项目,在项目中用的最多的就是UITableView了,但是也是问题出现的最多的地方,由于一开始不熟练,导致很多问题花了很长时间才解决.所以利用这两天空闲时间,好好梳理一下这 ...

  2. spring mvc在普通类中获取HttpServletRequest对象

    如题,需要在web.xml中配置request监听,如下 <listener> <description>spring request监听器</description&g ...

  3. P2P中的NAT穿越方案简介

    文章链接: http://www.shipin.it/Index/videolist/id/68.html

  4. C/C++基础知识总结——C++简单程序设计

    1. sizeof 1.1 sizeof(类型名) 1.2 sizeof 表达式 1.3 返回所占字节大小 2. I/O流的输出格式 2.1 常用I/O流库操纵符 dec         十进制 he ...

  5. CentOS安装Python教程

    下载/安装python yum install -y bzip2* #nodejs 0.8.5需要,请安装python前,先安装此模块.   wget http://www.python.org/ft ...

  6. 多线程编程中使用pthread_create内存泄露问题

    //tls5源代码: #include <stdio.h> #include <unistd.h> #include <string.h> #include &qu ...

  7. iOS获取程序运行平台

    下面这个博客里面写的很清楚 http://blog.sina.com.cn/s/blog_890a737301014fim.html

  8. Hibernate之AbstractEntityPersister

    Hibernate开发中需要根据持久层对象获取所映射的数据库表相关信息,如表名,主键,外键对象等相关系. Hibernate配置 Hibernate.cfg.xml <?xml version= ...

  9. NPinyin 中文转换拼音代码

    Mono 3.2 测试NPinyin 中文转换拼音代码   C#中文转换为拼音NPinyin代码  在Mono 3.2下运行正常,Spacebuilder 有使用到NPinyin组件,代码兼容性没有问 ...

  10. Arduino 各种模块篇 震动模块 vibrator module

    The vibrator I got works at the voltage ranging from 3.3V ~ 5.5V I want to make it vibrate variably. ...