codeforces
文章平均质量分 51
红橙作伴的菜鸡
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #787 (Div. 3) A-G
A.Food for Animals#include <bits/stdc++.h>using namespace std;#define int long longconst int N = 2e5 + 10;#define debug(a) cout << #a << ": " << a << '\n';int t;int n,m,k;string s,ts;int a,b,c,x,y;signed main(){原创 2022-05-06 14:02:32 · 501 阅读 · 0 评论 -
Educational Codeforces Round 125 (Rated for Div. 2)D. For Gamers. By Gamers.
分析题意可知,当我们有人数 * 士兵攻击力 / 怪兽血量 > 怪兽攻击 / 士兵血量的时候可以获得这局的胜利,同时我们的招募花费不能多过C。即寻找满足人数 × 士兵攻击力 × 士兵血量 > 怪兽攻击力 × 怪兽血量 的最小花费。判断这个花费会不会小于C。这题的重点在于我们不对n处理,我们对花费C来做离线处理。因为C是小于1e6的,可以用ClogC的复杂度完成问题。#include <bits/stdc++.h>using namespace std;#define fi f原创 2022-03-23 20:37:43 · 622 阅读 · 0 评论 -
E. Two Round Dances
E. Two Round DancesOne day, n people (n is an even number) met on a plaza and made two round dances, each round dance consists of exactly n2 people. Your task is to find the number of ways n people can make two round dances if each round dance consists of原创 2021-01-25 20:17:56 · 195 阅读 · 0 评论 -
codeforces Round #696 Div.2 ABC
被A题卡到死。。。先开始硬模拟,样例都过了wa第三个点,好久才贪心过的A。蹲墙角自闭去了。。。A. Puzzle From the Future首先我们将a的每一位都赋予1,因为如果是不冲突的情况下我们肯定更倾向于让a的每一位取1来使ab之和更大,然后我们处理冲突的时候就是判断当a的当前位取1的时候会不会存在两位相同的情况,如果存在,便将1改为0。#include <bits/stdc++.h> using namespace std;typedef pair<int,in原创 2021-01-22 02:34:55 · 230 阅读 · 2 评论 -
codeforces #693 div3 ABCDE
A - Cards for Friends长宽分别除以二,直到奇数为止。#include <bits/stdc++.h>using namespace std;int main(){ int t; int w,h,n; int num; cin >> t; while(t--){ num = 1; cin >> w >> h >> n; while(w原创 2021-01-06 14:20:39 · 176 阅读 · 0 评论 -
codeforces #686 div3 D.Number into Sequence 2021.1.4
codeforces #686 div3 D.Number into SequenceYou are given an integer n (n>1).Your task is to find a sequence of integers a1,a2,…,ak such that:·each ai is strictly greater than 1;·a1⋅a2⋅…⋅ak=n (i. e. the product of this sequence is n);·ai+1 is divisi原创 2021-01-04 04:15:21 · 319 阅读 · 0 评论