博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
POJ 3617 Best Cow Line 贪心
阅读量:7280 次
发布时间:2019-06-30

本文共 1082 字,大约阅读时间需要 3 分钟。

不能单纯比较头尾两个字符,应该比较头尾两个字符串。

//#pragma comment(linker, "/STACK:1024000000,1024000000")#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;typedef long long ll;typedef unsigned long long ull;typedef pair
pii;#define pb(a) push(a)#define INF 0x1f1f1f1f#define lson idx<<1,l,mid#define rson idx<<1|1,mid+1,r#define PI 3.1415926535898template
T min(const T& a,const T& b,const T& c) { return min(min(a,b),min(a,c));}template
T max(const T& a,const T& b,const T& c) { return max(max(a,b),max(a,c));}void debug() {#ifdef ONLINE_JUDGE#else freopen("in.txt","r",stdin); //freopen("d:\\out1.txt","w",stdout);#endif}int getch() { int ch; while((ch=getchar())!=EOF) { if(ch!=' '&&ch!='\n')return ch; } return EOF;}const int maxn=2005;char s[maxn];int main(){ int n; while(scanf("%d",&n)!=EOF) { for(int i=0;i
View Code

 

转载于:https://www.cnblogs.com/BMan/p/3645284.html

你可能感兴趣的文章
移动端的适配及布局
查看>>
跨域访问
查看>>
aotoo-hub,一体式大前端架构
查看>>
Ubuntu创建新用户的正确姿势
查看>>
Webpack 4 教程 - 4. 使用SplitChunksPlugin插件进行代码分割
查看>>
项目经验不丰富、技术不突出的程序员怎么打动面试官?
查看>>
如何跨操作系统共享文件?你还在用U盘傻瓜式地拷贝文件吗?
查看>>
使用Jest测试JavaScript(Mock篇)
查看>>
J2EE 核心模式
查看>>
浅谈react性能优化的方法
查看>>
Mac升级python2 到 python3
查看>>
你完全没了解过的日志异步落库
查看>>
如何使用纯 CSS 制作四子连珠游戏
查看>>
分布式的系统核心是什么——日志
查看>>
D3.js系列学习笔记之一:初识绘图流程和基本思想
查看>>
「JavaScript」函数声明和函数表达式
查看>>
webpack4 的开发环境配置说明
查看>>
【JavaScript】面向对象
查看>>
手机端简洁日历控件iantoo.week()
查看>>
一起来学SpringBoot | 第六篇:整合SpringDataJpa
查看>>