比赛地址:AtCoder Beginner Contest 133 A - T or T 题目大意:nn 个同学一起去旅行,坐火车的话每人要 aa 元,做出租车的话总共要 bb 元,问最少花费多少元? 解题思路:直接计算取最小值即可 #include <cstdio> #include <algorithm> int main() { int n, a, b; scanf("%d%d%d", &n, &a, &b...
AtCoder Beginner Contest 133 目录 Contest Info Solutions A. T or T B.Good Distance C. Remainder Minimization 2019 D. Rain Flows into Dams E. Virus Tree 2 F. Colorful TreeContest Info[Practice Link](https://atcoder.jp/contests/abc133/tasks) ...
我们首先假设一下这题只考虑一个距离为<=1的节点不能染相同的颜色,ans=k*(k-1)^(n-1),即对于每一个点来说有几种可以选的颜色,如果父亲节点选了,选择有k种,则儿子节点不能选,只有(k-1)种,儿子的兄弟节点也只有相同的k-1种,儿子节点的儿子节点也有n-1种; 那么距离为<=2的叶子节点不能染相同的颜色...
C - Remainder Minimization 2019 Time Limit: 2 sec / Memory Limit: 1024 MB Score : 300300 points Problem Statement You are given two non-negative integers LL and RR. We will choose two integers ii and jj such that L≤i<j≤RL≤i<j≤R. Find the minimum possible value of (i×j) mod...
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
AtCoder Beginner Contest 402(A-F详细题解) A 思路:我们直接输出字符串中的大写字母即可。 代码:#include<bits/stdc++.h> using namespace std; #define int long long #define N 500010 signed main(){ string s;cin>>… 秋日薄雾 Atcoder Education DP Contest 很好的 Atcoder 的 DP ...
AtCoder Beginner Contest 283 E - Don't Isolate Elements https://www.bilibili.com/video/BV1oD4y1L76r/ https://www.cnblogs.com/zltzlt-blog/p/17344192.html AtCoder Beginner Contest 283 E. Don‘t Isolate Elements(预支下一行状态的状压dp) ...
AtCoder Beginner Contest 323 A 至 F 題讲解 by dreamoon https://www.bilibili.com/video/BV1VN411b7Pd/ AtCoder Beginner Contest 323 https://www.bilibili.com/video/BV1m84y1177k/ Xy_top Atcoder Beginner Contest #323 实况 https://www.bilibili.com/video/BV1Rj41147sE/ AtCoder Beginner Conte...
AtCoder Beginner Contest 400 A-F LHao AtCoder Beginner Contest 402(A-F详细题解) A 思路:我们直接输出字符串中的大写字母即可。 代码:#include<bits/stdc++.h> using namespace std; #define int long long #define N 500010 signed main(){ string s;cin>>… 秋日薄雾 AtCoder Begin...
AtCoder Beginner Contest 153 花式打怪 F题 题目大意: 在一个2D模板游戏中,所有的怪物都是在X轴上的,每个怪物有两个属性X和HP,分别代表怪物的位置和生命值。 玩家控制的角色有一个技能,玩家每次释放技能可以选择一个位置x,技能会对[x - d, x + d]范围内的所有怪物造成a点伤害,请问,玩家最少需要使用多少...