题目链接: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. RN九宫格

    九宫格可以用两种方式来做,一种使用SectionList,是我的另外一篇博客,还有一种的纯代码计算,下面是效果图 代码如下: var Dimensions = require('Dimensions' ...

  2. 数据库 - Navicat与pymysql模块

    一.Nabicat 在生产环境中操作MySQL数据库还是推荐使用命令行工具mysql,但在我们自己开发测试时, 可以使用可视化工具Navicat,以图形界面的形式操作MySQL数据库 官网下载:htt ...

  3. oracle安装---yum.sh

    !#/bin/bash yum install binutils* -yyum install compat* -yyum install elfutils* -yyum install gcc* - ...

  4. [Java in NetBeans] Lesson 05. Method/function

    这个课程的参考视频和图片来自youtube. 主要学到的知识点有: Define a method:(motivation: write one time, but use it many times ...

  5. 适用于 Windows 7 SP1 和 Windows Server 2008 R2 SP1 的 .NET Framework 4.6、4.6.1、4.6.2 和 4.7 以及适用于 Windows Server 2008 SP2 的 .NET Framework 4.6 仅安全更新说明:2017 年 9 月 12 日

    https://support.microsoft.com/zh-cn/help/4040957/description-of-the-security-only-update-for-the-net ...

  6. iOS 新浪微博-1.1框架升级

    在iOS 新浪微博-1.0框架搭建 中,使用的是xcode5.1.1开发.现在把重整了一下框架 改为xcode7.0开发 使用cocoaPad管理第三方库 程序将托管到github上 在改为xcode ...

  7. UVa 202 Repeating Decimals(抽屉原理)

    Repeating Decimals 紫书第3章,这哪是模拟啊,这是数论题啊 [题目链接]Repeating Decimals [题目类型]抽屉原理 &题解: n除以m的余数只能是0~m-1, ...

  8. 有关g++的Xlinker选项

    事情的起因是,在使用Eclipse配置opencv的库时,发现使用-Wl 选项需要自己在Linker flags的输入框里指定.并不是像使用-l选项或-I选项那样可以直接添加选项的条目就可以了.但是在 ...

  9. IE浏览器解决无法识别js中getElementsByClassName问题

    关于ie浏览器无法识别js中getElementsByClassName问题,现通过以下方法,引用如下js /** *打印js对象详细信息 */ function alertObj(obj) { va ...

  10. json为txt文本加密

    我们知道json是一种数据传输的加密格式 这里为txt格式的文本加密(纯属无聊)   写的比较凌乱,查找你输入的两个文件夹下面的所有txt文件(包含下一级文件): 运行时要注意,别把重要文件给加密了 ...