团 大连网赛 1007 Friends and Enemies

 1 //大连网赛 1007 Friends and Enemies
 2 // 思路:思路很棒!
 3 // 转化成最大二分图
 4 // 团:点集的子集是个完全图
 5 // 那么朋友圈可以考虑成一个团,原题就转化成用团去覆盖怎样最多。团至少是2个点,所以就是n*n/4
 6 
 7 #include <bits/stdc++.h>
 8 using namespace std;
 9 #define LL long long
10 typedef pair<int,int> pii;
11 const double inf = 123456789012345.0;
12 const LL MOD =100000000LL;
13 const int N =1e4+10;
14 #define clc(a,b) memset(a,b,sizeof(a))
15 const double eps = 1e-7;
16 void fre() {freopen("in.txt","r",stdin);}
17 void freout() {freopen("out.txt","w",stdout);}
18 inline int read() {int x=0,f=1;char ch=getchar();while(ch>'9'||ch<'0') {if(ch=='-') f=-1; ch=getchar();}while(ch>='0'&&ch<='9') {x=x*10+ch-'0';ch=getchar();}return x*f;}
19 
20 int main(){
21     int n,m;
22     while(~scanf("%d%d",&n,&m)){
23        if(m>=(LL)n*n/4) puts("T");
24        else puts("F");
25     }
26     return 0;
27 }
原文地址:https://www.cnblogs.com/ITUPC/p/5860195.html