题目链接: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. 深入浅说服务如何以Jar包的方式发布

    序言 笔者前段时间在使用自研框架NF( 传送门 )开发一个自动模板生成工具之后,想将他发布到Linux下,之前一直使用IDE直接run as运行,在遇到发布的时候考虑过发布为war或者jar,在一番抉 ...

  2. Java字符串的不可变性

    声明一个字符串引用变量: String  s = "abcd"; s是一个引用变量,指向 堆内存中的字符串常量 "abcd" 再声明一个字符串引用变量: Str ...

  3. Python For Mac 开发环境安装 以及问题记录

    Python For Mac 开发环境安装记录 把自己安装的过程记录一下,亲测可用 1.Python3环境安装(转载http://www.cnblogs.com/meng1314-shuai/p/90 ...

  4. LR报:Error 27796 Failed to connect to server

    原错误信息: Action.c(58): Error -27796: Failed to connect to server "10.1.44.68:7013": [10048] ...

  5. Python 基础知识总结

    strptime() 根据指定的格式将一个时间字符串解析为一个时间元组. time.strptime(time_str[,format]) 返回strcut_time对象 #time_str 是时间字 ...

  6. 【c++进阶:c++ 顺序容器vector,string,deque,list,forward_list,array常用性质】

    常用5种顺序容器性质: https://blog.csdn.net/oil_you/article/details/82821833 关于deque https://www.cnblogs.com/L ...

  7. Django学习之Form表单

    一.Form介绍 普通方式手写注册功能 使用form组件实现注册功能 二.Form那些事儿 1.常用字段与插件 initial error_messages password radioSelect ...

  8. Binary-to-text ecoding:

    binary to Text ecoding是指将二进制数据转换成可打印的符号 如果传输channel 不允许二进制数据(如email) 一般使用Base64 ASCII 标准使用128位来表示字母数 ...

  9. mysql 5.5 安装教程

    (转自:https://www.cnblogs.com/solargen/p/6835399.html) 1. 官网下载mysql5.5 下载地址: http://dev.mysql.com/down ...

  10. Windows 2008任务计划执行bat脚本失败返回0x1

    测试环境: C:\>systeminfo | findstr /c:"OS Name"OS Name:                   Microsoft Windows ...