結果
| 問題 | No.1120 Strange Teacher |
| コンテスト | |
| ユーザー |
e869120
|
| 提出日時 | 2020-07-04 00:54:44 |
| 言語 | C++14 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 364 ms |
| コンパイル使用メモリ | 73,484 KB |
| 実行使用メモリ | 9,796 KB |
| 最終ジャッジ日時 | 2026-10-13 15:33:51 |
| 合計ジャッジ時間 | 2,057 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | WA * 25 |
ソースコード
#include <iostream>
using namespace std;
long long A, B, C, D;
int sgn(long long x) {
if (x > 0) return 1;
if (x == 0) return 0;
return -1;
}
int main() {
cin >> A >> B >> C >> D;
if (sgn(B) == sgn(D)) {
if (A * D < B * C) cout << "Yes" << endl;
else cout << "No" << endl;
}
if (sgn(B) != sgn(D)) {
if (A * D > B * C) cout << "Yes" << endl;
else cout << "No" << endl;
}
return 0;
}
e869120