zoukankan      html  css  js  c++  java
  • ARC108

    A
    (quad)模拟

    code

    #include<iostream>
    #include<cstdio>
    #include<cstdlib>
    #include<cstring>
    #include<string>
    #include<algorithm>
    #include<cmath>
    #include<ctime>
    #include<climits>
    #include<sstream>
    #include<fstream>
    using namespace std;
    #define int long long
    
    signed main()
    {
        int s , p;
        cin >> s >> p;
        for(register int i = 1 ; i * i <= p ; i++)
        {
            if(p % i != 0)
            {
                continue;
            }
            int n = i;
            int m = p / i;
            if(n + m == s)
            {
                cout << "Yes";
                return 0;
            }
        }
        cout << "No";
        return 0;
    }
    

    B
    (quad)模拟+1

    code

    #include<iostream>
    #include<cstdio>
    #include<cstdlib>
    #include<cstring>
    #include<string>
    #include<algorithm>
    #include<cmath>
    #include<ctime>
    #include<climits>
    #include<sstream>
    #include<fstream>
    using namespace std;
    #include<stack>
    #define int long long
    
    const int N = 2e5 + 10;
    
    stack<char> st;
    char s[N];
    char t[N];
    int tot;
    
    signed main()
    {
        //freopen("B.in" , "r" , stdin);
        //freopen("B.out" , "w" , stdout);
        int n;
        cin >> n;
        int count = 0;
        for(register int i = 1 ; i <= n ; i++)
        {
            char c;
            cin >> c;
            st.push(c);
            if(st.size() >= 3)
            {
                int th = st.top();
                st.pop();
                int se = st.top();
                st.pop();
                int fs = st.top();
                st.pop();
                if(fs == 'f' && se == 'o' && th == 'x')
                {
                    count++;
                }
                else
                {
                    st.push(fs);
                    st.push(se);
                    st.push(th);
                }
            }
        }
        cout << n - count * 3;
        return 0;
    }
    

    C
    (quad)咕咕咕

    $——byquad wanwanjiuhao7744$
  • 相关阅读:
    CodeSmith-Select
    winform显示、隐藏任务栏及开始菜单
    WinForm水印文本框
    添加自定义字体
    判断网络地址是否是自动获取
    设置本地网络为自动获取
    获取本地连接ip 掩码 网关 DNS
    指定WinCE部署路径
    SqlCeHelper
    docker netcore
  • 原文地址:https://www.cnblogs.com/wanwanjiuhao7744/p/15125930.html
Copyright © 2011-2022 走看看