poj 3913(水)
Description
Given two strings s and t, you have to decide whether s is a
subsequence of t, i.e. if you can remove characters from t such that the
concatenation of the remaining characters is s.
Input
strings s, t of alphanumeric ASCII characters separated by
whitespace.The length of s and t will no more than 100000.
Output
Sample Input
sequence subsequence
person compression
VERDI vivaVittorioEmanueleReDiItalia
caseDoesMatter CaseDoesMatter
Sample Output
Yes
No
Yes
No
题意:递增或递减
#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
typedef long long ll;
#include<cstring>
#define N 200
using namespace std;
int main()
{
int t;
scanf("%d",&t);
int a[N],b[N],c[N];
for(int i=;i<t;i++)
{
scanf("%d%d%d",&a[i],&b[i],&c[i]);
}
printf("Gnomes:\n");
for(int j=;j<t;j++)
{
if((a[j]<b[j]&&b[j]<c[j])||(a[j]>b[j]&&b[j]>c[j]))
printf("Ordered\n");
else
printf("Unordered\n");
}
}
poj 3913(水)的更多相关文章
- poj 1269 水题
题目链接:http://poj.org/problem?id=1269 #include<cstdio> #include<cstring> #include<cmath ...
- POJ 3356 水LCS
题目链接: http://poj.org/problem?id=3356 AGTC Time Limit: 1000MS Memory Limit: 65536K Total Submission ...
- Bloxorz I (poj 3322 水bfs)
Language: Default Bloxorz I Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 5443 Acce ...
- poj 2245 水题
求组合数,dfs即可 #include<cstdio> #include<iostream> #include<algorithm> #include<cst ...
- PIGS POJ - 1149(水最大流)
题意: 有M个猪圈,每个猪圈里初始时有若干头猪.一开始所有猪圈都是关闭的.依次来了N个顾客,每个顾客分别会打开指定的几个猪圈,从中买若干头猪.每个顾客分别都有他能够买的数量的上限.每个顾客走后,他打开 ...
- Machine Schedule POJ - 1325(水归类建边)
Machine Schedule Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 17457 Accepted: 7328 ...
- Ikki's Story IV - Panda's Trick POJ - 3207(水2 - sat 在圈内 还是 在圈外)
题意: 就是一个圈上有n个点,给出m对个点,这m对个点,每一对都有一条边,合理安排这些边在圈内或圈外,能否不相交 解析: 我手残 我手残 我手残 写一下情况 只能是一个在圈外 一个在圈内 即一个1一个 ...
- poj 1298(水题)
The Hardest Problem Ever Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 24241 Accept ...
- POJ 1502 水 dij
题意:给N,表示N个节点. 给半个邻接矩阵,本身到本身的距离是0,边是双向的.当两个节点之间没有直接的边连接的时候,用x表示. 问从第一个节点到其他所有节点至少花费的时间. 这题唯一的处理是处理邻接矩 ...
随机推荐
- java基础学习四
一.java中的基本数据类型 二.double和float精度不准的问题 double和float本身确实存在某种缺陷,不能用于精确计算. 解决办法: 用java.math.BigDecimal,通过 ...
- 【SQL】ROWNUM和ROWID
一.ROWNUM ROWNUM伪列是Oracle先查到结果集之后再加上去的一个伪列,这个伪列对符合条件的结果添加一个从1开始的序列号,并且序列号是从1开始增序排列的. SQL> select r ...
- vegas pro 15解决导入的视频和音频有噪声问题,亲测可行
中文步骤: 按住Shift->点击选项->首选项,松开Shift 点击右上角"内部"选项卡,在最下面的搜索栏输入SO4 找到第二项Enable So4 Compound ...
- 【sqli-labs】 less41 GET -Blind based -Intiger -Stacked(GET型基于盲注的堆叠查询整型注入)
整型的不用闭合引号 http://192.168.136.128/sqli-labs-master/Less-41/?id=1;insert into users(id,username,passwo ...
- pyqt5 做的小程序,可以用来UI做个小demo
#!/usr/bin/python3# -*- coding: utf-8 -*- """ZetCode PyQt5 tutorial This program crea ...
- BZOJ : [Usaco2013 Nov]Crowded 单调队列
正反两遍个来一次单调队列 DP 即可. Code: #include<cstdio> #include<deque> #include<algorithm> usi ...
- xpath 获取深圳房源信息并导出csv
# -*- coding: utf-8 -*- # @Time : 2019/4/28 10:44 # @Author : wujf # @Email : 1028540310@qq.com # @F ...
- Python画三维图-----插值平滑数据
一.二维的插值方法: 原始数据(x,y) 先对横坐标x进行扩充数据量,采用linspace.[如下面例子,由7个值扩充到300个] 采用scipy.interpolate中的spline来对纵坐标数据 ...
- Linux基础:find命令总结
本文只总结一些常用的用法,更详细的说明见man find和 info find. find命令 find命令常用来查找文件或目录,可以根据给定的路径和表达式查找所需的文件或目录.该工具是由findut ...
- POJ 1979 Red and Black (BFS)
链接 : Here! 思路 : 简单的搜索, 直接广搜就ok了. /****************************************************************** ...