前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >Atcoder训练计划

Atcoder训练计划

作者头像
attack
发布2018-09-30 09:58:26
4930
发布2018-09-30 09:58:26
举报

争取三天做完一套吧,太简单的就写一句话题解吧(其实也没多少会做的)

自己做出来的在前面用*标记

agc007

A - Shik and Stone

暴力dfs即可,直接判断个数

B - Construct Sequences

https://cloud.tencent.com/developer/article/1350465

C - Pushing Balls

https://cloud.tencent.com/developer/article/1350468

agc015

*A - A+...+B Problem

结论题。

代码语言:javascript
复制
#include<cstdio>
#include<iostream>
#define LL long long 
using namespace std;
main() {
     LL N, A, B;
     cin >> N >> A >> B;
     cout << max((LL)0, (N - 1) * B + A - (N - 1) * A - B + 1);
    return 0;
}

*B - Evilator

大力特判

代码语言:javascript
复制
#include<cstdio>
#include<iostream>
#include<cstring>
#define LL long long 
using namespace std;
const int MAXN = 1e5 + 10;
char s[MAXN];
main() {
    scanf("%s", s + 1);
    int N = strlen(s + 1);
    LL ans = 0;
    for(int i = 1; i <= N; i++) {
        if(s[i] == 'U') ans += (N - i) + (i - 1) * 2;
        else ans += (N - i) * 2 + (i - 1);
    }
    cout << ans;
    return 0;
}

C - Nuske vs Phantom Thnook

https://cloud.tencent.com/developer/article/1345721

D - A or...or B Problem

https://cloud.tencent.com/developer/article/1345634

F - Kenus the Ancient Greek

https://cloud.tencent.com/developer/article/1345717

agc016

*A - Shrinking

https://cloud.tencent.com/developer/article/1345718

B - Colorful Hats

https://cloud.tencent.com/developer/article/1345721

C - +/- Rectangle

https://cloud.tencent.com/developer/article/1345722

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2018-09-26 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • agc007
    • A - Shik and Stone
      • B - Construct Sequences
        • C - Pushing Balls
        • agc015
          • *A - A+...+B Problem
            • *B - Evilator
              • C - Nuske vs Phantom Thnook
                • D - A or...or B Problem
                  • F - Kenus the Ancient Greek
                  • agc016
                    • *A - Shrinking
                      • B - Colorful Hats
                        • C - +/- Rectangle
                        领券
                        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档