zoukankan      html  css  js  c++  java
  • Codeforces Round #246 (Div. 2)

    版权声明:本文为博主原创文章。未经博主同意不得转载。 https://blog.csdn.net/yew1eb/article/details/25991183

    A、Choosing Teams

    水题

    #include <cstdio>
    #include <cstring>
    using namespace std;
    
    int main()
    {
        int n, k, ans, i, x;
        scanf("%d%d",&n,&k);
        ans = 0;
        for(i=0; i<n; ++i)
        {
            scanf("%d",&x);
            if(5-x >= k) ans++;
        }
        ans /= 3;
        printf("%d
    ", ans);
        return 0;
    }

    B、Football Kit

    水题

    #include <cstdio>
    #include <cstring>
    #include <set>
    using namespace std;
    
    const int maxn = 100000 + 100;
    int x[maxn], y[maxn], tx[maxn];
    int main()
    {
        int  n, i, j;
        scanf("%d",&n);
        for(i=0; i<n; ++i)
        {
            scanf("%d%d",&x[i], &y[i]);
            tx[ x[i]] ++;
        }
        for(i=0; i<n; ++i)
            printf("%d %d
    ", n-1 + tx[ y[i] ], n-1 - tx[ y[i] ]);
        return 0;
    }

    C、Prime Swaps


    D、Prefixes and Suffixes


    E、Square Tiling


查看全文
  • 相关阅读:
    log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
    警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:fhcq-oa' did not find a matching property.
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    Maven 仓库之阿里云镜像配置
    HashMap 在 Java1.7 与 1.8 中的区别
    MySQL 相关知识细节及解析
    JS 如何准确获取当前页面URL网址信息
    i++ 和 ++i
    常见浏览器兼容性问题与解决方案(面试题目)
    面试题目简单整理-完善中
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10717086.html
  • Copyright © 2011-2022 走看看