【水打表】#69 A. Panoramix's Prediction
来源:互联网 发布:淘宝锋利小刀 编辑:程序博客网 时间:2024/05/02 06:44
问m是不是n的下一个整数,那就先把50以内的素数背出来呗~
然后从第一个开始一个一个往下看~ 啊当然如果m不在这个素数表里那肯定就是NO啦,然后看n是否在m和m前的素数间啦,要注意的是区间范围是左闭右开哦
#include <cstdio>#include <string>#include <cstring> #include <iostream>#include <algorithm>using namespace std;typedef long long ll;// http://codeforces.com/contest/80 // Panoramix's Prediction1 int prime[]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47};int main(){int n,m;cin>>n>>m;for(int i=0;i<=14;i++){if(prime[i]>n){if(prime[i]==m){cout<<"YES";return 0;}cout<<"NO";return 0;}}cout<<"NO";return 0;}
0 0
- 【水打表】#69 A. Panoramix's Prediction
- A. Panoramix's Prediction
- Codeforces 80A Panoramix's Prediction
- a newbie in Porto Seguro’s Safe Driver Prediction(solo参赛 TOP 5%)
- kaggle-Porto Seguro's Safe Driver Prediction
- Kaggle笔记:Porto Seguro’s Safe Driver Prediction(1)
- Kaggle笔记:Porto Seguro’s Safe Driver Prediction(2)
- Callgrind: a call-graph generating cache and branch prediction profiler
- 【Deep Learning】genCNN: A Convolutional Architecture for Word Sequence Prediction
- Depth Map Prediction from a Single Image using a Multi-Scale Deep Network
- 【论文笔记】Depth Map Prediction from a Single Image using a Multi-Scale Deep Network
- 学习笔记-Depth Map Prediction from a Single Image using a Multi-Scale Deep Network
- Depth Map Prediction from a Single Image using a Multi-Scale Deep Network
- Andrew W. Davis’s 2013 prediction -- Cisco will exit the hardware-based group video conferencing
- B/S、C/S、 A/S
- 【每周一文】Ad Click Prediction: a View from the Trenches(2013)
- pDHS-SVM:A prediction method for plant DNase I hypersensitive sites based on support vector machine
- A Guide For Time Series Prediction Using Recurrent Neural Networks (LSTMs)
- 常用的Javascript设计模式
- 老杜(杜昶旭)GRE填空笔记部分整理-by“ 1哥”+ TTC相关资料
- Find Minimum in Rotated Sorted Array II
- 【Leetcode】Pow(x,n)
- Minimum Window Substring
- 【水打表】#69 A. Panoramix's Prediction
- POJ 3715:计算工作天数
- 深度优先搜索算法(DFS,Depth First Search)的PHP实现
- 微软宣布它爱 Linux
- Robot 第五周(机体局部动作测试和研究动力学建模)
- 在android中使用achartengine来绘制各种图表
- android输入法中的imeoption
- Ubuntu12.04系统编译Android4.4源码
- Ubuntu使用日志2(在Eclipse中搭建C++交叉编译环境)