icpc大连站网络赛 1007

 1 #include<stdio.h>
 2 #include<iostream>
 3 #include<algorithm>
 4 #include<math.h>
 5 #include<string.h>
 6 #include<string>
 7 #include<map>
 8 #include<set>
 9 #include<vector>
10 #include<queue>
11 #define M(a,b) memset(a,b,sizeof(a))
12 using namespace std;
13 typedef long long ll;
14 const int inf=0x3f3f3f;
15 int main(){
16     ll q,p;
17     while(~scanf("%lld%lld",&q,&p)){
18         ll z=q/2;
19         ll x=q-z;
20         if(z*x>p) printf("F\n");
21         else printf("T\n");
22     }
23     return 0;
24 }
25 /*
26
27
28
29 */
时间: 2024-08-06 14:12:38

icpc大连站网络赛 1007的相关文章

icpc大连站网络赛 1009 补图最短路

BFS+链表 代码改自某博客 1 #include<stdio.h> 2 #include<iostream> 3 #include<algorithm> 4 #include<math.h> 5 #include<string.h> 6 #include<string> 7 #include<map> 8 #include<set> 9 #include<vector> 10 #include&l

HDU 5875 Function -2016 ICPC 大连赛区网络赛

题目链接 网络赛的水实在太深,这场居然没出线zzz,差了一点点,看到这道题的的时候就剩半个小时了.上面是官方的题意题解,打完了才知道暴力就可以过,暴力我们当时是想出来了的,如果稍稍再优化一下估计就过了zzz.去年有一场现场赛也是n=1000,n^3过了,看来关键时刻实在做不出来就得大胆暴力啊. #include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=1e5+5; int a[maxn]

2016ACM/ICPC亚洲区大连站-重现赛(感谢大连海事大学)(6/10)

1001题意:n个人,给m对敌对关系,X个好人,Y个坏人.现在问你是否每个人都是要么是好人,要么是坏人. 先看看与X,Y个人有联通的人是否有矛盾,没有矛盾的话咋就继续遍历那些不确定的人关系,随便取一个数3,与其相连的就是4,间隔就要相同,dfs搜过去就可以判断了 #include<bits/stdc++.h> using namespace std; #pragma comment(linker, "/STACK:102400000,102400000") #define

2016ACM/ICPC亚洲区大连站-重现赛

题目链接:http://acm.hdu.edu.cn/search.php?field=problem&key=2016ACM%2FICPC%D1%C7%D6%DE%C7%F8%B4%F3%C1%AC%D5%BE-%D6%D8%CF%D6%C8%FC%A3%A8%B8%D0%D0%BB%B4%F3%C1%AC%BA%A3%CA%C2%B4%F3%D1%A7%A3%A9&source=1&searchmode=source A.染色乱搞. 1 #include <bits/st

2016 ACM/ICPC亚洲区大连站-重现赛 解题报告

任意门:http://acm.hdu.edu.cn/showproblem.php?pid=5979 按AC顺序: I - Convex Time limit    1000 ms Memory limit 65536 kB OS Windows We have a special convex that all points have the same distance to origin point. As you know we can get N segments after linki

2014 ACM/ICPC 鞍山赛区网络赛(清华命题)

为迎接10月17号清华命题的鞍山现场赛 杭电上的题目 Biconnected(hdu4997)      Rotate(hdu4998)     Overt(hdu4999)   Clone(hdu5000)   Walk(hdu5001)   LianLianKan   Rescue   Spy's Work   Color the Tree   The Ghost Blows Light   USACO ORZ   2013/8/27

[ACM] zoj 3809 The Himalayas (2014 ACMICPC Regional 牡丹江站网络赛 A题)

he Himalayas Time Limit: 2 Seconds      Memory Limit: 65536 KB As an artist, Bob usually need to travel around the world. He made a lot of sketch of scenery on his journey. A famous spot he have visited recently is the Himalayas. The Himalayas is a m

hdu 4006 优先队列 2011大连赛区网络赛F **

签到题都要想一会 1 #include<cstdio> 2 #include<iostream> 3 #include<algorithm> 4 #include<cstring> 5 #include<cmath> 6 #include<queue> 7 #include<map> 8 using namespace std; 9 #define MOD 1000000007 10 const int INF=0x3f3

hdu 4005 双联通 2011大连赛区网络赛E *****

题意: 有一幅图,现在要加一条边,加边之后要你删除一条边,使图不连通,费用为边的费用,要你求的是删除的边的最小值的最大值(每次都可以删除一条边,选最小的删除,这些最小中的最大就为答案) 首先要进行缩点,把图缩为一棵树,因此,加入一条边后图就会存在一个环,环中的任何一条边删除后都不会导致图不连通 之后找一条最小的边,可以说这条边肯定是在加边之后的连通块里的,因为如果不在连通块里,那就直接可以把这条最小的边删掉,而达不到求出答案的目的 找到边后,分别从边的两点开始遍历,要遍历出一条路径来,并且边上的