Say Hello to Codeforces — Codeforces #440(Div.2)

Revision en1, by physics0523, 2017-10-15 16:23:35

Hello,Codeforces!

Tell trueth,I've already joined 4 other contests in here.

Today,I joined in #440(Div.2). Codeforces Round #440 (Div. 2, based on Technocup 2018 Elimination Round 2)

A:First,judge 1~9,After that,judge 10~99.

B:If k==1,output the minimum number.
If k==2,output the maximum of a[0],a[n-1],and the 2nd lowest number.
If k>=3,output the maximum number.

C:The best idea is 4+4+4+...+4+k.
If k==0,the output is q[i]/4.
If k==1, last +4+4+1 change to +9.
So,the output is (q[i]/4)-1.
If k==2, last +4+2 change to +6.
So,the output is q[i]/4.
If k==3, last +4+4+4+3 change to +9+6.
So,the output is (q[i]/4)-1.
In every query, you can response the answer in O(1).

Accepted:ooo--
Rating change:1441->1527(+86,highest)

Atcoder:Blue(1626,max1729)

Nice to meet you!

Ja: こどふぉ始めてみました!(とはいえこれ含めもう5回コンテスト出てるんですが)
ブログのシステムがよく分かっておらず、とりあえず一本書いてみました(解法…ですかねぇ…)
これから日本人にとって人権的な時間のコンテストなら積極的に出ようと思います!

#### History

Revisions

Rev. Lang. By When Δ Comment
en1 physics0523 2017-10-15 16:23:35 1114 Initial revision (published)