zoukankan      html  css  js  c++  java
  • UVa10340 All in All

    #include <iostream>
    #include <string>
    using namespace std;

    int main()
    {
        string s, t;
        string::size_type p, q;
        while (cin >> s >> t)
        {
            p = 0;
            for (string::const_iterator it = s.begin(); it != s.end(); ++it)
            {
                q = t.find_first_of(*it, p);
                if (q == string::npos)
                    break;
                p = q + 1;
            }

            if (q != string::npos)
                cout << "Yes ";
            else
                cout << "No ";
        }

        return 0;
    }

  • 相关阅读:
    case when if
    存储过程 、函数和事务
    poj 2263
    hdu -1874
    poj 2472
    2544 hdu
    模板floyed
    模板Dijkstra
    hdu 2066
    hdu 2544
  • 原文地址:https://www.cnblogs.com/danny1221/p/4594464.html
Copyright © 2011-2022 走看看