题目链接:http://codeforces.com/contest/835/problem/A

题意:两个人给网站发信息,现在给出信息的长度n,两个人的延迟和打字速度(一个字符),问网站先收到哪个人的信息或者同时收到(平局)。对于每个人的流程是:先进行一次延迟,然后开始输入信息,最后再进行一个延迟后网站收到该人所发的信息。

思路:水题。 按照题意求出两人的所花时间即可

#define _CRT_SECURE_NO_DEPRECATE
#include<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string>
#include<queue>
#include<vector>
#include<time.h>
#include<cmath>
#include<set>
#include<map>
using namespace std;
typedef long long int LL;
const int MAXN = 1e6 + ;
const int INF = 1e9;
const int mod = 1e9 + ;
int main(){
#ifdef kirito
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
int s,v1,v2,t1,t2;
while (~scanf("%d%d%d%d%d", &s,&v1,&v2,&t1,&t2)){
LL res1 = t1 + t1 + 1LL * s*v1;
LL res2 = t2 + t2 + 1LL * s*v2;
//printf("%lld %lld\n", res1, res2);
if (res1 == res2){
printf("Friendship\n");
}
else if (res1 < res2){
printf("First\n");
}
else{
printf("Second\n");
}
}
return ;
}

Codeforces Round #427 (Div. 2) - A的更多相关文章

  1. CodeForces 835C - Star sky | Codeforces Round #427 (Div. 2)

    s <= c是最骚的,数组在那一维开了10,第八组样例直接爆了- - /* CodeForces 835C - Star sky [ 前缀和,容斥 ] | Codeforces Round #4 ...

  2. CodeForces 835D - Palindromic characteristics | Codeforces Round #427 (Div. 2)

    证明在Tutorial的评论版里 /* CodeForces 835D - Palindromic characteristics [ 分析,DP ] | Codeforces Round #427 ...

  3. Codeforces Round #427 (Div. 2) Problem D Palindromic characteristics (Codeforces 835D) - 记忆化搜索

    Palindromic characteristics of string s with length |s| is a sequence of |s| integers, where k-th nu ...

  4. Codeforces Round #427 (Div. 2) Problem C Star sky (Codeforces 835C) - 前缀和

    The Cartesian coordinate system is set in the sky. There you can see n stars, the i-th has coordinat ...

  5. Codeforces Round #427 (Div. 2) Problem A Key races (Codeforces 835 A)

    Two boys decided to compete in text typing on the site "Key races". During the competition ...

  6. Codeforces Round #427 (Div. 2) B. The number on the board

    引子: A题过于简单导致不敢提交,拖拖拉拉10多分钟还是决定交,太冲动交错了CE一发,我就知道又要错过一次涨分的机会.... B题还是过了,根据题意目测数组大小开1e5,居然蒙对,感觉用vector更 ...

  7. Codeforces Round #427 (Div. 2)—A,B,C,D题

    A. Key races 题目链接:http://codeforces.com/contest/835/problem/A 题目意思:两个比赛打字,每个人有两个参数v和t,v秒表示他打每个字需要多久时 ...

  8. Codeforces Round #427 (Div. 2)——ABCD

    http://codeforces.com/contest/835 A.拼英语水平和手速的签到题 #include <bits/stdc++.h> using namespace std; ...

  9. 【Codeforces Round #427 (Div. 2) D】Palindromic characteristics

    [Link]:http://codeforces.com/contest/835/problem/D [Description] 给你一个字符串; 让你在其中找到1..k阶的回文子串; 并统计它们的数 ...

  10. 【Codeforces Round #427 (Div. 2) A】Key races

    [Link]:http://codeforces.com/contest/835/problem/A [Description] [Solution] 傻逼题. [NumberOf WA] [Revi ...

随机推荐

  1. Vue中computed、methods、watch的联系和区别

    computed是计算树形,methods是方法. new Vue({ el: '#example', data: { message: 'Hello' }, computed: { reversed ...

  2. Linux shell - cut命令用法(转载)

    cut  [-bn] [file] 或 cut [-c] [file]  或  cut [-df] [file] 使用说明 cut 命令从文件的每一行剪切字节.字符和字段并将这些字节.字符和字段写至标 ...

  3. 20182335实验一《Linux基础与Java开发环境》

    课程:<程序设计与数据结构> 班级: 1823 姓名: 李金泉 学号:20182335 实验教师:王志强 实验日期:2019年9月9日 必修/选修: 必修 1.实验内容 基于命令行和IDE ...

  4. LeetCode_70.爬楼梯

    LeetCode-70 LeetCode_70.爬楼梯 假设你正在爬楼梯.需要 n 阶你才能到达楼顶. 每次你可以爬 1 或 2 个台阶.你有多少种不同的方法可以爬到楼顶呢? 注意:给定 n 是一个正 ...

  5. Linux下用jar命令更新jar包文件

    jar -uvf SDK_Web_ChartReport.war  view/global/header.jsp echo '样式文件替换进包中'   查看jar包中的文件: jar -tvf SDK ...

  6. leetcode-mid-backtracking-17. Letter Combinations of a Phone Number

    mycode  68.26% class Solution(object): def letterCombinations(self, digits): """ :typ ...

  7. ros 下常用的依赖库

    <buildtool_depend>catkin</buildtool_depend> <build_depend>nav_msgs</build_depen ...

  8. MS入门学习笔记

    1.建立晶体:选择晶系,添加原子:2.导入系统晶体文件:3.建立分子molecule,画原子:4.计算简单分子molecule:注意事项: 1)做了一个H2O分子,接下来要做一个“立体壳子”,因为CA ...

  9. 刃边法计算MTF(ESF、LSF、PSF)

    MTF 调制传递函数 评价一个成像系统目前主流的办法主要有三种TV line检测,MTF检测,和SFR检测. MTF是Modulation Transfer Function的英文简称,中文为调制传递 ...

  10. 使用事件CreateEvent注意事项 多进程同步的方法

    https://www.cnblogs.com/aakuang/p/3514658.html 使用事件CreateEvent注意事项   HANDLECreateEvent( LPSECURITY_A ...