結果
| 問題 |
No.740 幻の木
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-02-03 00:41:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 279 bytes |
| コンパイル時間 | 1,619 ms |
| コンパイル使用メモリ | 167,052 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-30 03:03:31 |
| 合計ジャッジ時間 | 2,223 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 3 WA * 3 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
int n, m, p, q;
cin >> n >> m >> p >> q;
int ans = 0;
while(n > 0){
ans++;
if(p-1 <= ans%12 && ans%12 < p+q-1) n -= 2*m;
else n -= m;
}
cout << ans << endl;
return 0;
}