题目链接:http://abc042.contest.atcoder.jp/tasks/abc042_a

Time limit : 2sec / Memory limit : 256MB

Score : 100 points

Problem Statement

Iroha loves Haiku. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 57 and 5 syllables, in this order.

To create a Haiku, Iroha has come up with three different phrases. These phrases have AB and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Constraints

  • 1≦A,B,C≦10

Input

The input is given from Standard Input in the following format:

A B C

Output

If it is possible to construct a Haiku by using each of the phrases once, print YES (case-sensitive). Otherwise, print NO.


Sample Input 1

Copy
5 5 7

Sample Output 1

Copy
YES

Using three phrases of length 55 and 7, it is possible to construct a Haiku.


Sample Input 2

Copy
7 7 5

Sample Output 2

Copy
NO

题解:看三个数的和是否能整除(5+5+7==14)

 #include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <ctime>
#include <map>
#include <set>
#include <queue>
using namespace std;
#define lowbit(x) (x&(-x))
#define max(x,y) (x>y?x:y)
#define min(x,y) (x<y?x:y)
#define MAX 100000000000000000
#define MOD 1000000007
#define pi acos(-1.0)
#define ei exp(1)
#define PI 3.141592653589793238462
#define INF 0x3f3f3f3f3f
#define mem(a) (memset(a,0,sizeof(a)))
typedef long long ll;
ll gcd(ll a,ll b){
return b?gcd(b,a%b):a;
}
bool cmp(int x,int y)
{
return x>y;
}
const int N=;
const int mod=1e9+;
int main()
{
std::ios::sync_with_stdio(false);
int a,b,c;
cin>>a>>b>>c;
if((a+b+c)%==) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return ;
}

和風いろはちゃんイージー / Iroha and Haiku (ABC Edition) (水水)的更多相关文章

  1. 文字列大好きいろはちゃんイージー / Iroha Loves Strings (ABC Edition) (优先队列)

    题目链接:http://abc042.contest.atcoder.jp/tasks/abc042_b Time limit : 2sec / Memory limit : 256MB Score ...

  2. [Arc058E] Iroha and Haiku

    [Arc058E] Iroha and Haiku 题目大意 问有多少\(n\)个数的正整数序列,每个数在\([1,10]\)之间,满足存在\(x,y,z,w\)使得\(x\to y-1,y\to z ...

  3. Solution -「ARC 058C」「AT 1975」Iroha and Haiku

    \(\mathcal{Description}\)   Link.   称一个正整数序列为"俳(pái)句",当且仅当序列中存在连续一段和为 \(x\),紧接着连续一段和为 \(y ...

  4. AtCoder 瞎做

    目录 ARC 058 E - 和風いろはちゃん / Iroha and Haiku 题意 题解 技巧 代码 ARC 059 F - バイナリハック / Unhappy Hacking 题意 题解 技巧 ...

  5. AtCoder-arc058(题解)

    A - こだわり者いろはちゃん / Iroha's Obsession(暴力) 题目链接 题目大意: 给你 \(k\) 个个位数字和一个数字 \(n\) ,要求找到一个大于等于n的数字,使得不出现 \ ...

  6. csp退役前的做题计划1(真)

    csp退役前的做题计划1(真) 因为我太菜了,所以在第一次月考就会退役,还是记录一下每天做了什么题目吧. 任务计划 [ ] Z算法(Z Algorithm) 9.28 [x] ARC061C たくさん ...

  7. 【AtCoder】ARC058

    ARC058 C - こだわり者いろはちゃん / Iroha's Obsession 暴力一个个枚举是最简单的方式 #include <bits/stdc++.h> #define fi ...

  8. AtCoder Regular Contest 058

    这个应该是第一场有英文的atcoder吧??不过题解却没有英文的... 从前往后慢慢做... C こだわり者いろはちゃん / Iroha's Obsession 数据范围这么小,直接暴力 #inclu ...

  9. AtCoder Beginner Contest 265(D-E)

    D - Iroha and Haiku (New ABC Edition) 题意: 找一个最少含有三个点的区间,将区间分成三块,三块的和分别为p,q,r,问是否存在这样的区间 题解:先预处理一遍前缀和 ...

随机推荐

  1. finecms如何控制调用子栏目的数量

    finecms如何控制调用子栏目的数量?比如只要调用栏目id为23下的3个子栏目要怎么写?我们把num=3放后面不能实现,放在return前面就可以了,原来是顺序的问题,return只能放最后 {li ...

  2. Always On 集群监听创建失败问题

    创建SQL Server Always On监听失败如下 需要增加:1.登陆服务器的域账号创建计算机对象的权限,2.集群名称账号在域环境中创建计算机对象的权限 如果是重建监听:需要3.先删除原先的监听 ...

  3. 爬虫mm131明星照片

    ''' 1. 爬取以下站点中各个明星图片,分别单独建文件夹存放. 起始URL地址:http://www.mm131.com/mingxing ''' import os import logging ...

  4. pycharm的小问题之光标

    一大早起来,突然发现pycharm的光变粗,按退格键会删除编写的内容,超级难受(如下图), 百度一下,也不知道在百度框里输什么关键字好,但最后还是找到了,哈哈.... ​ 解决方法: 1.按键盘上In ...

  5. double类型相减有小数误差

    如 :19.9-9.9=9.9999999999999,而不是10double相减会转换成二进制,因double有效位数为 16位这就会出现存储小数位数不够的情况,这种情况下就会出现误差 //两个Do ...

  6. [js]javascript中4种异步

    javascript中4种异步: 1.ajax 2.定时器 3.事件绑定 4,回调 定时器 //顺序执行 /* var s = 0; for (var i = 0; i < 10000; i++ ...

  7. 【Java】-NO.16.EBook.4.Java.1.002-【疯狂Java讲义第3版 李刚】- 数据类型

    1.0.0 Summary Tittle:[Java]-NO.16.EBook.4.Java.1.002-[疯狂Java讲义第3版 李刚]- 数据类型 Style:EBook Series:Java ...

  8. HTTPS流程

    我们都知道HTTPS能够加密信息,以免敏感信息被第三方获取.所以很多银行网站或电子邮箱等等安全级别较高的服务都会采用HTTPS协议. HTTPS简介 HTTPS其实是有两部分组成:HTTP + SSL ...

  9. [LeetCode] 408. Valid Word Abbreviation_Easy

    Given a non-empty string s and an abbreviation abbr, return whether the string matches with the give ...

  10. MySQL数据类型--与MySQL零距离接触2-6数据表

    系型数据库--二维表格也就是数据表,有行和列,行称为记录,列称为字段.有数据库只是一个空架子,要存数据需要有数据表.设计数据表.  使用数据库,打开数据库: 显示当前打开的那个数据库:SELECT D ...