题目链接: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. 手把手教你用 Git(转)

    转自:http://blog.jobbole.com/78960/ 一:Git是什么? Git是目前世界上最先进的分布式版本控制系统. 二:SVN与Git的最主要的区别? SVN是集中式版本控制系统, ...

  2. Vuex 页面刷新后store保存的数据会丢失 取cookie值

    在store.js中 export default new vuex.Store({ // 首先声明一个状态 state state:{ pcid: '', postList: [], } //更新状 ...

  3. GlusterFS 配置及使用

    GlusterFS集群创建 一.简介 GlusterFS概述 Glusterfs是一个开源的分布式文件系统,是Scale存储的核心,能够处理千数量级的客户端.在传统的解决 方案中Glusterfs能够 ...

  4. Python socketserver模块解析

    参考:https://blog.csdn.net/qq_33733970/article/details/79153938 1.功能简介 socketserver模块是对socket模块的再封装,用于 ...

  5. Spring MVC定时服务

    spring-mvc-config.xml <context:component-scan base-package="com.bf" ></context:co ...

  6. JAVA代码(GET方式)请求URL(HTTP,HTTPS)

    /** * * @param url 这个只支持http地址,不支持https * @param request * @return */ public static String sendMessa ...

  7. centos7安装Amber16 && AmberTools

    Centos7 安装amber16 1.准备下载好的amber(Amber16.tar.bz2)及tools(AmberTools16.tar.bz2)安装包: $ cd MySoftware_hom ...

  8. Mac为python2.7.10安装pip

    首先下载get-pip.py https://bootstrap.pypa.io/get-pip.py alias python="/usr/bin/python2.7" pyth ...

  9. python list成员函数extend与append的区别

    extend 原文解释,是以list中元素形式加入到列表中 extend list by appending elements from the iterable append(obj) 是将整个ob ...

  10. 强势龙头股的 VOLM5/35/135 走势,可作为逃顶参考

    强势龙头股的 VOLM5/35/135 走势,可作为逃顶参考