http://acm.hdu.edu.cn/showproblem.php?pid=1854

随手练习

 #include <bits/stdc++.h>
using namespace std;
int t;
string s;
int main(){
scanf("%d",&t);
while(t--){
int flag=;
int zero=;
int one=;
string s2;
cin>>s2;
int len=s2.length();
for(int i=;i<len;i++){
if(s2[i]==''){
zero++;
}else{
if(zero==){
flag=;
}
zero--;
}
}
if(flag) cout<<"No"<<endl;
else{
cout<<"Yes"<<endl;
}
}
return ;
}

HDU1854 Q-Sequence的更多相关文章

  1. Using dbms_shared_pool.purge to remove a single task from the library cache

    我们都知道可是使用 alter system flush shared_pool 来清除shared pool 信息,当时不能指定清除某个对象.因为在系统繁忙的时侯 使用 alter system f ...

  2. Hibernate映射之实体映射<转载>

    实体类与数据库之间存在某种映射关系,Hibernate依据这种映射关系完成数据的存取,因此映射关系的配置在Hibernate中是最关键的.Hibernate支持xml配置文件与@注解配置两种方式.xm ...

  3. RH033读书笔记(8)-Lab 9 Using vim

    Lab 9 Using vim Sequence 1: Navigating with vim 1. Log in as user student 2. [student@stationX ~]$ c ...

  4. 使用DBMS_SHARED_POOL包将对象固定到共享池

    使用DBMS_SHARED_POOL包将对象固定到共享池2011年06月24日 09:45:00 Leshami 阅读数:5808 版权声明:本文为博主原创文章,欢迎扩散,扩散请务必注明出处. htt ...

  5. idea maven springmvc mybabit 多模块管理整合

    一.安装软件jdk1.7,tomcat7.0,idea,mysql,maven 二.在idea中配置jdk 1.依次点开File -->Project Structure,点击左侧标签页,点击S ...

  6. IGS_学习笔记03_Integrated SOA Gateway设定配置(案例)

    20150506 Created By BaoXinjian

  7. Q - Play With Sequence HDU - 3971 线段树 重新排序建树

    Q - Play With Sequence HDU - 3971 这个题目是一个线段树,比较特别的线段树,就是c询问一定次数之后重新排序建树来优化减低复杂度. 第一次碰到这种题目有点迷. 这个题目写 ...

  8. [LeetCode] Binary Tree Longest Consecutive Sequence 二叉树最长连续序列

    Given a binary tree, find the length of the longest consecutive sequence path. The path refers to an ...

  9. UESTC 1546 Bracket Sequence

                                        Bracket Sequence Time Limit: 3000MS   Memory Limit: 65536KB   64 ...

  10. timus 1175. Strange Sequence 解题报告

    1.题目描述: 1175. Strange Sequence Time limit: 1.0 secondMemory limit: 2 MB You have been asked to disco ...

随机推荐

  1. android自定义控件(二) 入门,继承View

    转载请注明地址:http://blog.csdn.net/ethan_xue/article/details/7313788 ps: 可根据apidemo里LableView,list4,list6学 ...

  2. CodeForces - 1005E2:Median on Segments (General Case Edition) (函数的思想)

    You are given an integer sequence a1,a2,…,ana1,a2,…,an. Find the number of pairs of indices (l,r)(l, ...

  3. springMVC源代码阅读之servlet部分<一>servlet部分详解

    [一]servlet的概念

  4. phantomjs学习

    PhantomJS快速入门 本文简要介绍了PhantomJS的相关基础知识点,主要包括PhantomJS的介绍.下载与安装.HelloWorld程序.核心模块介绍等.由于鄙人才疏学浅,难免有疏漏之处, ...

  5. jdk安装图解--windows系统(第一次安装和第二次安装区别)

    第一次安装可参考 https://jingyan.baidu.com/article/22fe7cedc9b93e3003617f64.html 第二次安装,如已经配置好环境变量,cmd下执行java ...

  6. BZOJ2329:[HNOI2011]括号修复

    浅谈\(splay\):https://www.cnblogs.com/AKMer/p/9979592.html 浅谈\(fhq\)_\(treap\):https://www.cnblogs.com ...

  7. Day07:常用模块,面向对象编程(对象&类)及内置函数

    今日内容:1.常用模块2.面向对象编程(*****)    介绍面向对象编程    类    对象3.内置函数------------------------------1.面向过程编程    核心“ ...

  8. linux查询内存真是利用率

    使用top工具查看到Suse Linux的内存占用率很大,可能97%以上,我知道这是Linux的内存使用机制,先将内存整个管理起来,需要的时候在分配给单个进程.但是如果我需要查看系统真实的内存占用率应 ...

  9. LeafLet之气泡框隐藏"x"图标

    例子:var marker.bindPopup( "我是一个图标的文本", { minWidth: 300 }).openPopup();L.Popup Constructor(函 ...

  10. java&nbsp;Class类

    java Class类 Class类(在java.lang包中,Instances of the class Classrepresent classes and interfaces in a ru ...