結果
| 問題 | No.1129 Rating じゃんけん |
| ユーザー |
|
| 提出日時 | 2020-08-01 05:51:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 547 bytes |
| 記録 | |
| コンパイル時間 | 698 ms |
| コンパイル使用メモリ | 73,036 KB |
| 最終ジャッジ日時 | 2025-01-12 12:11:39 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 16 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
const std::vector<std::string> winner{"null", "tRue", "Draw"};
void solve() {
int a1, b1, a2, b2;
std::cin >> a1 >> b1 >> a2 >> b2;
int result = -1;
if (a1 != a2) {
result = (a1 > a2 ? 0 : 1);
} else if (b1 == b2) {
result = 2;
} else {
result = ((b1 - b2 + 3) % 3 == 2 ? 0 : 1);
}
std::cout << winner[result] << "\n";
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}