D - Disjoint Set of Common Divisors Problem Statement Given are positive integers AA and BB. Let us choose some number of positive common divisors of AA and BB. Here, any two of the chosen divisors must be coprime. At most, how many divisors can we c…
A - ABCxxx Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement This contest, AtCoder Beginner Contest, is abbreviated as ABC. When we refer to a specific round of ABC, a three-digit number is appended after ABC. For example,…
A - ABC/ARC Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Smeke has decided to participate in AtCoder Beginner Contest (ABC) if his current rating is less than 1200, and participate in AtCoder Regular Contest (ARC) oth…
A - Addition and Subtraction Easy Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Joisino wants to evaluate the formula "A op B". Here, A and B are integers, and the binary operator op is either + or -. Your task is…
题目链接:http://abc069.contest.atcoder.jp/assignments A - K-City Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement In K-city, there are n streets running east-west, and m streets running north-south. Each street running east-w…
题目链接:http://abc070.contest.atcoder.jp/assignments A - Palindromic Number Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement You are given a three-digit positive integer N.Determine whether N is a palindromic number.Here, a…
A - Remaining Time Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement Dolphin loves programming contests. Today, he will take part in a contest in AtCoder.In this country, 24-hour clock is used. For example, 9:00 p.m. is re…
F - Dist Max 2 什么时候我才能突破\(F\)题的大关... 算了,不说了,看题. 简化题意:给定\(n\)个点的坐标,定义没两个点的距离为\(min(|x_i-x_j|,|y_i-y_j|)\),求所有点对中距离的最大值.其实看到一个最小,一个最大就应该想到二分的...最小值最大或最大值最小,二分答案不是最擅长解决这类问题的吗?但有时候就会想想了,为什么二分答案在这些条件下就十分适用了...考虑最小值最大(或最大值最小),说明有很多方案,每个方案都有对应的最小值,求所有方案的最大值…
A - Haiku Time limit : 2sec / Memory limit : 256MB Score : 100 points Problem Statement As a New Year's gift, Dolphin received a string s of length 19.The string s has the following format: [five lowercase English letters],[seven lowercase English le…
[题意]一共有N个任务和M天,一个人一天只能做一个任务,做完任务之后可以在这一天之后的(Ai-1)天拿到Bi的工资,问M天内最多可以拿到多少工资. 链接:https://atcoder.jp/contests/abc137/tasks/abc137_d [思路]按时间将任务排序,把 ii 时刻能做的任务都扔进堆里 , 因为任务是一次性的,所以每个任务放进去过就不再放入了.然后每个时刻看一下堆里面有没有数,有的话就取堆顶出来,而且每个时刻只能取一次.正确性显然. 代码: #include<bits…