結果
| 問題 |
No.740 幻の木
|
| コンテスト | |
| ユーザー |
ngtkana
|
| 提出日時 | 2020-02-26 23:15:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 406 bytes |
| コンパイル時間 | 1,457 ms |
| コンパイル使用メモリ | 166,040 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-13 15:34:37 |
| 合計ジャッジ時間 | 1,943 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 4 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using longlong=long long;
int main(){
std::cin.tie(nullptr);std::cin.sync_with_stdio(false);
int n,m,p,q;std::cin>>n>>m>>p>>q;
p--,q--;
n=(n+m-1)/m;
int X=12+q-p+1;
int ans=n/X*12;
n%=X;
for(int i=0;i<12;i++){
if(n==0)break;
ans++;
if(--n==0)break;
if(p<=i&&i<=q&&--n==0)break;
}
std::cout<<ans<<std::endl;
}
ngtkana