「CF80A」Panoramix's Prediction

Posted shenxiaohuang

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了「CF80A」Panoramix's Prediction相关的知识,希望对你有一定的参考价值。

Portal

Portal1: Codeforces

Portal: Luogu

Code

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>

using namespace std;

int n, m, pri[15] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47};
int main() {
    scanf("%d%d", &n, &m);
    int x = -2, y = -2;
    for (int i = 0; i < 15; i++) {
        if (n == pri[i]) x = i;
        if (m == pri[i]) y = i;
    }
    if (fabs(x - y) == 1) printf("YES
"); else printf("NO
");
    return 0;
}

以上是关于「CF80A」Panoramix's Prediction的主要内容,如果未能解决你的问题,请参考以下文章

CF666E Forensic Examination [后缀自动机,线段树合并]

pig 将Hbase中表导出为CSV出现错误 高分!!! 求解!!!

CF718EMatvey's Birthday BFS+动态规划

CF.666E.Forensic Examination(广义后缀自动机 线段树合并)

CF 1912 A NEKO's Maze Game

CF1279D Santa's Bot