zoukankan      html  css  js  c++  java
  • LibreOJ #6212. 「美团 CodeM 决赛」melon

    二次联通门 : LibreOJ #6212. 「美团 CodeM 决赛」melon

    /*
        LibreOJ #6212. 「美团 CodeM 决赛」melon
    
        MDZZ
        这是决赛题??
    */
    #include <cstdio>
    #include <iostream>
    #include <cmath>
    
    const int BUF = 12312312;
    char Buf[BUF], *buf = Buf;
    typedef long long LL;
    
    inline void read (LL &now)
    {
        for (now = 0; !isdigit (*buf); ++ buf);
        for (; isdigit (*buf); now = now * 10 + *buf - '0', ++ buf);
    }
    
    int Main ()
    {
        fread (buf, 1, BUF, stdin);
        LL T; read (T);
        for (; T; -- T)
        {
            LL N, L; read (N), read (L);
            if (N <= L) printf ("%lld", N);
            else if (N > L && (N <= (L << 1))) printf ("%lld", L);
            else printf ("%lld", (N + 1) / 2);    
            putchar ('
    ');        
        }
        return 0;
    }
    int ZlycerQan = Main ();
    int main (int argc, char *argv[]) {;}
  • 相关阅读:
    consumer详解
    消费幂等
    死信队列
    消息重试
    负载均衡
    存储层
    producer消息
    消息发送与接收
    TCC
    form表单提交前进行加密
  • 原文地址:https://www.cnblogs.com/ZlycerQan/p/7425081.html
Copyright © 2011-2022 走看看