結果
問題 | No.513 宝探し2 |
ユーザー | Yasufu12 |
提出日時 | 2017-05-05 23:27:07 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 374 bytes |
コンパイル時間 | 638 ms |
コンパイル使用メモリ | 53,848 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 3.00 |
最終ジャッジ日時 | 2024-07-17 01:03:23 |
合計ジャッジ時間 | 1,642 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
#include <iostream> using namespace std; int dis[2], ansx = 0, ansy = 0; int main(){ cout << 0 << " " << 0 << endl; cin >> dis[0]; cout << 100000 << " " << 0 << endl; cin >> dis[1]; for (int i = 0; i <= 100000; i++){ if (dis[0] + dis[1] - i * 2 == 100000){ ansy = i; break; } } ansx = dis[0] - ansy; cout << ansx << " " << ansy << endl; return 0; }