結果
問題 | No.149 碁石の移動 |
ユーザー | RCCW |
提出日時 | 2017-02-04 23:04:19 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 228 bytes |
コンパイル時間 | 1,375 ms |
コンパイル使用メモリ | 157,148 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-24 03:22:29 |
合計ジャッジ時間 | 1,776 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { long long a,b,c,d,e,f; cin>>a>>b; cin>>c>>d; cin>>e>>f; if(b>e){ }else if(e>b){ a=a-(e-b); c=(e-b)+c; } if(f<=c){ cout<<f+a<<endl; }else{ cout<<c+a<<endl; } }