题目链接:https://abc085.contest.atcoder.jp/tasks/abc085_b Time limit : 2sec /Memory limit : 256MB Score :200points Problem Statement AnX-layered kagami mochi(X≥1)is a pile ofXround mochi (rice cake) stacked vertically where each mochi (except the bottom one) has a smaller diameter th...
传送门:https://abc085.contest.atcoder.jp/tasks/abc085_d 有N把武士刀,对于每一把武士刀,有以下两种攻击方法: ①常规:攻击造成a点damage,可连续多次使用; ②终结:攻击造成b点damage,使用一次后丢弃。 对于每一把武士刀,有a≤b。 为造成至少H点的damage,求最小攻击次数。 设置一个优先队列(用std::priori...
AtCoder Beginner Contest 085C Otoshidama https://atcoder.jp/contests/abc085/tasks/abc085_c 题意:钞票面额只能是10000,5000,1000,有n张钞票组成了y元,求是否可能,若可能就输出一组可行方案。 思路:先把所有面额除以1000,方便计算。枚举10000面额的数量,得到剩余的钞票总面额a和张数z。设5000的数量是x,...
Problem Statement The commonly used bills in Japan are 10000-yen, 5000-yen and 1000-yen bills. Below, the word “bill” refers to only these. According to Aohashi, he received an otoshidama (New Year money gift) envelope from his grandfather that contained N bills for a total of Y yen...
Register as a new user and use Qiita more conveniently You get articles that match your needs You can efficiently read back useful information You can use dark theme What you can do with signing up Sign upLogin Comments No comments Let's comment your feelings that are more than good ...
Register as a new user and use Qiita more conveniently You get articles that match your needs You can efficiently read back useful information You can use dark theme What you can do with signing up Sign upLogin Comments No comments Let's comment your feelings that are more than good ...
ContestProblemMemo ABC167 D - Teleporter DP Doubling typical90 012 - Red Painting(★4) Union Find atc001 B - Union Find Union Find abc097 D - Equals Union Find arc032 B - 道路工事 Union Find abc049 D - 連結 Union Find abc120 D - Decayed Bridges Union Find abc157 D - Friend ...
mrashid5919 Add solution for problem C - Illuminate Buildings d527599· Dec 21, 2024 HistoryHistory File metadata and controls Code Blame 58 lines (54 loc) · 1018 Bytes Raw #include<bits/stdc++.h> using namespace std; #define fastio ios::sync_with_stdio(0);cin.tie(0) long long po...
A - Libra 题目链接:https://abc083.contest.atcoder.jp/tasks/abc083_a Time limit : 2sec /Memory limit : 256MB Score :100points Problem Statement A balance scale tips to the left ifL>R, whereLis the total weight of the masses on the left pan andRis the total weight of the masses on...
AtCoder Beginner Contest 085C Otoshidama https://atcoder.jp/contests/abc085/tasks/abc085_c 题意:钞票面额只能是10000,5000,1000,有n张钞票组成了y元,求是否可能,若可能就输出一组可行方案。 思路:先把所有面额除以1000,方便计算。枚举10000面额的数量,得到剩余的钞票总面额a和张数z。设5000的数量是x,...