Codeforces Beta Round #2 A B C

AI权益加码!Claude Code、Cursor等20+工具免费用! 购周边限时加赠Coding Plan Lite,畅享主流AI工具!学习进阶更高效! 阅读详情

Codeforces Beta Round #2 A B C

http://codeforces.com/contest/2


A. Winner

题目地址

题意
给出一个游戏得分列表,判断最终是谁赢了。
最终得分高的人人赢,如果最高分有多人,那么第一个得分>=最高分的人赢。

分析
麻烦的是处理多个高分的情况。
我用map处理数据,先找出最高分,以及最高分的人的列表,如果最高分的人有多个,再分情况讨论。

CODE

总结
map中,count方法是检查有没有某个项,而map赋值过便会增加一个项,即使赋值为0也是。


B. The least round way

题目地址

题意
给出一个矩阵,求找出一条从左上角到右下角的路,使得这条路上数的乘积后面的0最少。

分析
dp。这题折腾了好久.....略坑...
0是由2和5相乘产生的。
先dp一遍2的最少的路,再dp一遍5最少的路。那个最少那条路0就最少。
这里要特判0的存在,跪了好久....

CODE


C. Commentator problem

题目地址

题意
给出平面上三个圆形体育场的位置,要找出一个最佳的点,使得看三个圆的角度都一样大。如果又多个这样的点,找角度较大的那个。

分析
模拟退火,第一次遇到随机算法题目,蛋疼地学了半天模拟退火,然后敲完发现老是出不来...果然姿势不对,看别人的代码,compute函数有点问题,而且偏移bit每次是取半,改了好久终于过了。
不过还是糊里糊涂的...

CODE


Codeforces Beta Round #73 (Div. 2 Only) 文章目录前言一、题目链接1.[A. Chord](https://codeforces.com/contest/88/problem/A)2.[B. Keyboard](https://codeforces.com/contest/88/problem/B)3.[C. Trains](https://codeforces.com/contest/88/problem/C)4.[D. Vasya and Types](https://codeforces.com/contest/88/problem/D)总结 阅读详情

相关推荐

Codeforces Beta Round #68 - B- Train ( 贪心模拟 )

题目链接:点击进入 题目 题意 偷渡者和控制者玩以下游戏。 火车由 n 节车厢表示,车厢从头到尾用 1 到 n 的正整数编号。偷渡者和控制者最初在两辆不同的货车中。火车每分钟都可能处于两种状态移动或空闲。控制者每分钟都在移动。 控制器有运动方向——火车头或火车尾。在移动期间,控制者对应于其移动方向移动到相邻的货车。如果在他的移动结束时,控制者进入第 1 辆或第 n 辆货车,那么他将移动方向更改为另一侧。换句话说,控制者在整个游戏过程中循环地从火车的头部到尾部然后再返回,在每次移动期间移动一辆车。请注意,

Cosmic_Tree的博客 744

Codeforces Beta Round #2

A - Winner CodeForces-2A The winner of the card game popular in Berland “Berlogging” is determined according to the following rules. If at the end of the game there is only one player with the maximum...

默的博客 691

Codeforces Beta Round #2 题解

Author : Houge Problem set :Codeforces Beta Round #2 A - Winner 题目大意:   进行n轮游戏,每一轮以“名字 分数”的形式输入,第一个到达最高分的人为胜利者。 分析:   简单的模拟,可以用map储存姓名和分数,模拟两遍,第一遍先求出最高分,第二遍求出第一个到达最高分的人。(注意:分数可能有负数) 代码: ...

201

Codeforces Beta Round #2 C. Commentator problem 计算几何 + 模拟退火

C. Commentator problem solution 找点一个点使得,该点与三个圆的切线夹角都相等。找点问题,用模拟退火. 让每个 α\alphaα (6个) 都相等即找到D点. code /*SiberianSquirrel*//*CuteKiloFish*/ #include <bits/stdc++.h> //#include<bits/extc++.h> #include<ext/rope> #include<ext/pb_ds/assoc_c

qq_46173805的博客 452

Codeforces Beta Round #2-A. Winner——算法笔记

题目链接:http://codeforces.com/problemset/problem/2/A 题目描述: The winner of the card game popular in Berland “Berlogging” is determined according to the following rules. If at the end of the game there is ...

学而不思则忘 852

Codeforces Beta Round #2 A,B,C

A. Winner time limit per test:1 second memory limit per test:64 megabytes input:standard input output:standard output The winner of the card game popular in Berlan...

weixin_34008933的博客 94

Codeforces Beta Round #95 (Div. 2) A B C E

哎,心血来潮想做CF,大晚上去买了根网线(被坑了= =#),晚上在寝室客厅做。第一次这么认真滴做,Q都木有上,整整做了俩小时。。。D题木有看,E题挂掉了,rating涨了20+才。。。桑心。 A题,好好读题,表示英语不好真的伤不起捏 转换的条件是, 1、全部大写 2、除了第一个小写其他都是大写 B题,求相反数的对数,0特判,其他没啥了。 C题,组合数啊,很容易分析,关键是怎么求

小媛在努力~ 1737

Codeforces Beta Round #67 (Div. 2)——A,B,C

A. Life Without Zeros time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Can you imagine our life if we remove

Learn as if you were to live forever 2144

Codeforces Beta Round #70 (Div. 2)——A,B,C

A. Haiku time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Haiku is a genre of Japanese traditional poetry.

Learn as if you were to live forever 2037

Codeforces Beta Round #65 (Div. 2)——A,B,C

A. Way Too Long Words time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Sometimes some words like "localizati

Learn as if you were to live forever 1423

Codeforces Beta Round #72 (Div. 2 Only)——A,B,C

A. Toy Army time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output The hero of our story, Valera, and his best fri

Learn as if you were to live forever 1256

Codeforces Beta Round #76 (Div. 2 Only)——A,B,C

A. Restoring Password time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Igor K. always used to trust his favo

Learn as if you were to live forever 1604

Codeforces Beta Round #77 (Div. 2 Only)——A,B,C

A. Football time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Petya loves football very much. One day, as he

Learn as if you were to live forever 1667

Codeforces Beta Round #73 (Div. 2 Only)——A,B,C

A. Chord time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya studies music. He has learned lots of int

Learn as if you were to live forever 1234

[2020.4.5rating]codeforces Beta Round #92 (Div. 2 Only) (A、B)Codeforces Beta Round #95 (Div. 2)(A-C)

这里写目录标题一级目录二级目录三级目录链接A - The number of positions题目类型:思维题意:代码:B - Permutations题目类型:模拟题意:解题思路:代码:A - cAPS lOCK题目类型:模拟题意:解题思路:代码:E - Opposites Attract题目类型:思维题意:代码:F - The World is a Theatre题目类型:题意:解题思路:代...

与恶龙缠斗良久终成恶龙 347

Codeforces Beta Round div.2 #228 A B C D E

Codeforces Beta Round #228 A B C D E

水果君の日常 2201

Codeforces Beta Round #2 A map B dp C 模拟退火

链接:戳这里 A. Winner time limit per test1 second memory limit per test64 megabytes inputstandard input outputstandard output The winner of the card game popular in Berland "Berlogging" is de

Cross 1262
上一篇: Codeforces Beta Round div.2 #228 A B C D E
下一篇: HDU 4745 Two Rabbits(非连续最长回文子序列,区间DP)
hcbbt
博客等级 码龄14年 1143粉丝 392原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值