We will hold Monoxer Programming Contest 2024（AtCoder Beginner Contest 345）.

- Contest URL: https://atcoder.jp/contests/abc345
- Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240316T2100&p1=248
- Duration: 100 minutes
- Writer: Nyaan, math957963, evima, PCTprobability
- Tester: MtSaka, Aus21
- Rated range: ~ 1999
- The point values: 100-200-350-450-525-550-675

We are looking forward to your participation!

Good luck to everyone!

The contest cover page is in Japanese language even though my atcoder account is in English. Is that a contest registration issue or is it going to be in Japanese? Thanks, Rafael

ABC 345... Time for me to practice

`arithmetic series`

to prepare for this contest.ABC345? Increasing sequence?

contest questions are in japanese language?

Does the contest provide problem statements in English or only in Japanese?

Please tell us if you only provide Japanese problem statements.

Although I'm a Chinese, I know that there're some differences between Chinese and Japanese, so it may cause ambiguity.

To those who are confused

All previous rated ABC have Japanese and English statements. I don't know this time, but I guess it's the same since no special announcement was made.(I'm not an official)

How C

hintswapping i, j such that str[i] != str[j] will give a new string. you can also get original string if str[i] == str[j]

I actually tried implementing the same thing but I got WA x13

What could I be missing in my logic?

I could not understand your logic, but I think you are doing the same mistake I made yesterday.

I figured it out now, if we can generate the original string again then it would count as well in the final result, that would happen only if the frequency of any character is $$$>1$$$, so make $$$ans = 1$$$ when you see that, then iterate over the string to calculate the remaining answer.

why ain't this working , pls can you help me out

string s; cin>>s; int n=s.size(); map<char,int>mp;

for(int i=0; i<n;++i){ ++mp[s[i]]; } vectorv; for (auto it:mp ) { /* code */ v.push_back(it.second); }

int sum=0;

for (int i = 0; i < v.size(); i++) { /* code */

} for (auto it:v) { /* code */ if(it>1){ ++sum; break; } }

cout<<sum<<endl;

Problems were more difficult than usual today.

Atcoder Rand Contest.

This code passed Problem D. (Even though I tried 5 times)

Was E dp + 2-d segment tree?

It was just dp. Optimization could be done without segment tree using sets or without those as well.

I just messed up everything.

It's ok I solved it 10 mins after contest.

aMaZiNg

Top 200 EZ

Don't know if it was intended or not, but I guess the time limit is too loose for G. My $$$O(n^2/k)$$$ solution with a fast mod managed to squeeze into the time limit. XD

How to prune D?

with Backtracking.

You can first solve this problem for learning backtrack. Eight queens puzzle

Well it turned out I shouldn't sort the tiles by

increasingarea. I should sort them indecreaseNever mind

You don't really need to, there is a $$$O(n! \cdot 2^n \cdot H \cdot W)$$$ brute which fits into the time limit pretty easily.

Basically, for all possible orders of the tiles, try all combinations of both possible orientations (initial or rotate 90) among all tiles and for each of them try to fit the grid using the following pseudocode:

Code — 51308848

Toughest ABC I've seen in a while, problem E feels tougher to me than most CF Div2E problems @_@.

was E dp+segment tree?

To be honest, I don't know. I have an $$$O(n \cdot k)$$$ dp but its getting 5xWA and I'm still not sure where my logic is incorrect.

Try

The expected output is 3.

I ended up creating a video editorial for this problem. Here

Do take some pauses before jumping between chapters. Each chapter adds one optimisation to move one step closer.

thanks,it was helpful!!

F was easier than D :)

if you get wrong in c this because if there is a repetition of the letter, when you make a switch between the same letter, the resulting string calculates a new string just once. aab -> aab , baa , aba so the answer is 3 not 2 just do it before your code

for B ，why int(x/10) is wrong for negative ?

def solve(): x=int(input()) if x<=0: print(int(x/10)) else: if x%10!=0: print(x//10+1) else: print(x // 10)

I think the test case of A should add "<=<=>=>".Almost all the solutions didn't conside this.

why can't we print Yes for this string in A "><==>"?

upd:Got it

Problem E is fantastic, and I spend about two hours and finally get it accepted. My idea is to use dpmax[j][0] = pair<color0, value0>, and dpmax[j][1] = pair<color1, value1> to denote that, until now, if we remove j balls, the optimal two values with color0 and color1 as the rightmost ball. Besides, we use dp[i][j] to denote the optimal value that we can get, if we consider the first i balls and remove j of them. dp[i][j] can be computed simply by using dpmax[j][0] and dpmax[j][1], and then we should update dpmax[j][0] and dpmax[j][1].

Why A is giving WA?

my codestring s; cin>>s;

<=><=> here your code will print yes but this is no

Atcoder, where are the testcases of abc344 & abc345?

where are the test cases atcoder_official

where are the test cases atcoder_official