Codeforces ラウンド #262 (ディビジョン 2) A、B、C_html/css_WEB-ITnose
A. Vasya と Socks
テストごとの制限時間
1 秒テストごとのメモリ制限
256 メガバイト
入力
標準入力
出力
標準出力
Vasya は靴下を n 足持っています。毎日朝、ヴァシャは学校に行く前に靴下を履かなければなりません。夕方帰宅すると、ヴァシャは使用済みの靴下を脱いで捨てます。 m 日ごと (数字が m、?2m、?3m、?... の日) お母さんはヴァシャに靴下を一足買ってくれます。彼女はそれを夜遅くに行うので、ヴァシャは翌日まで新しい靴下を履くことができません。 Vasya の靴下がなくなるまで、連続して何日が経過しますか?
入力
1 行には 2 つの整数 n と m (1?≤?n?≤?100; 2?≤?m?≤?100) が含まれています。スペースで区切ります。
出力
単一の整数を出力しますか?問題の答え。
サンプル テスト
入力
rree
出力
入力
2 2
出力
9 3
注
最初にサンプル Vasya は最初の 2 日間、最初に履いていた靴下を履いて過ごしました。そして 3 日目に、彼は 2 日目に買った靴下を履きます。
2 番目のサンプルでは、Vasya は最初に持っていた靴下を履いて最初の 9 日間を過ごします。そして、3日目、6日目、9日目に買った靴下を履いて3日間過ごします。彼は12日目に買った靴下を履いてまた一日を過ごします。
テストごとのメモリ制限
256 メガバイト
入力
標準入力
出力
標準出力
Little Dima数学の授業中に悪行が多かったし、意地悪な先生もいたピクルスさんは彼に罰として次の問題を与えました。
方程式の整数解 x (0? x?=?b·s(x)a?+ ?c、?
ここで、a、b、c はあらかじめ決められた定数値であり、関数 s(x) は数値 x の 10 進表現のすべての桁の合計を決定します。
教師はレッスンごとにこの問題をディマに与えます。彼は方程式のパラメータのみを変更します: a、b、c。ディマは悪い点を取るのにうんざりしており、この難しい問題を解決するのを手伝ってほしいと頼まれました。
入力
最初の行には、スペースで区切られた 3 つの整数が含まれています: a,?b,?c (1?≤?a? ≤?5; 1?≤?b?≤?10000; ?-?10000?≤?c?≤?10000).
整数 n を出力します。見つけた解決策の数。次に、n 個の整数を昇順に出力しますか?与えられた方程式の解。ゼロより大きく、厳密に 109 未満の整数解のみを出力します。
Sample test(s)
input
3 2 8
output
310 2008 13726
input
1 2 -18
output
input
2 2 -1
output
41 31 337 967
C. Present
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
Little beaver is a beginner programmer, so informatics is his favorite subject. Soon his informatics teacher is going to have a birthday and the beaver has decided to prepare a present for her. He planted n flowers in a row on his windowsill and started waiting for them to grow. However, after some time the beaver noticed that the flowers stopped growing. The beaver thinks it is bad manners to present little flowers. So he decided to come up with some solutions.
There are m days left to the birthday. The height of the i-th flower (assume that the flowers in the row are numbered from 1 to n from left to right) is equal to ai at the moment. At each of the remaining m days the beaver can take a special watering and water wcontiguous flowers (he can do that only once at a day). At that each watered flower grows by one height unit on that day. The beaver wants the height of the smallest flower be as large as possible in the end. What maximum height of the smallest flower can he get?
Input
The first line contains space-separated integers n, m and w (1?≤?w?≤?n?≤?105; 1?≤?m?≤?105). The second line contains space-separated integers a1,?a2,?...,?an (1?≤?ai?≤?109).
Output
Print a single integer ? the maximum final height of the smallest flower.
Sample test(s)
input
6 2 32 2 2 2 1 1
output
input
2 5 15 8
output
Note
In the first sample beaver can water the last 3 flowers at the first day. On the next day he may not to water flowers at all. In the end he will get the following heights: [2, 2, 2, 3, 2, 2]. The smallest flower has height equal to 2. It's impossible to get height 3 in this test.

ホットAIツール

Undresser.AI Undress
リアルなヌード写真を作成する AI 搭載アプリ

AI Clothes Remover
写真から衣服を削除するオンライン AI ツール。

Undress AI Tool
脱衣画像を無料で

Clothoff.io
AI衣類リムーバー

AI Hentai Generator
AIヘンタイを無料で生成します。

人気の記事

ホットツール

メモ帳++7.3.1
使いやすく無料のコードエディター

SublimeText3 中国語版
中国語版、とても使いやすい

ゼンドスタジオ 13.0.1
強力な PHP 統合開発環境

ドリームウィーバー CS6
ビジュアル Web 開発ツール

SublimeText3 Mac版
神レベルのコード編集ソフト(SublimeText3)

ホットトピック









この記事では、HTML< Progress>について説明します。要素、その目的、スタイリング、および< meter>との違い要素。主な焦点は、< Progress>を使用することです。タスクの完了と< Meter> statiの場合

この記事では、HTML< Datalist>について説明します。オートコンプリートの提案を提供し、ユーザーエクスペリエンスの改善、エラーの削減によりフォームを強化する要素。

この記事では、html< meter>について説明します。要素は、範囲内でスカラーまたは分数値を表示するために使用され、Web開発におけるその一般的なアプリケーション。それは差別化< Meter> < Progress>およびex

記事では、HTML5クロスブラウザーの互換性を確保するためのベストプラクティスについて説明し、機能検出、プログレッシブエンハンスメント、およびテスト方法に焦点を当てています。

この記事では、ブラウザのユーザー入力を直接検証するために、必要、パターン、MIN、MAX、および長さの制限などのHTML5フォーム検証属性を使用して説明します。

この記事では、モバイルデバイスのレスポンシブWebデザインに不可欠なViewportメタタグについて説明します。適切な使用により、最適なコンテンツのスケーリングとユーザーの相互作用が保証され、誤用が設計とアクセシビリティの問題につながる可能性があることを説明しています。

この記事では、< iframe>外部コンテンツをWebページ、その一般的な用途、セキュリティリスク、およびオブジェクトタグやAPIなどの代替案に埋め込む際のタグの目的。

GiteEpages静的Webサイトの展開が失敗しました:404エラーのトラブルシューティングと解像度Giteeを使用する
