結果
| 問題 |
No.396 クラス替え
|
| コンテスト | |
| ユーザー |
samplelpmas
|
| 提出日時 | 2018-01-08 07:37:04 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 1,000 ms |
| コード長 | 429 bytes |
| コンパイル時間 | 510 ms |
| コンパイル使用メモリ | 53,752 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 11:53:30 |
| 合計ジャッジ時間 | 1,550 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <iostream>
using namespace std;
int main() {
int students, groups, hanakoRank, taroRank;
cin >> students >> groups >> hanakoRank >> taroRank;
if ((hanakoRank - taroRank) % (2 * groups) == 0) {
cout << "YES" << endl;
return 0;
}
if ((hanakoRank + taroRank) % (2 * groups) == 1) {
cout << "YES" << endl;
return 0;
}
cout << "NO" << endl;
return 0;
}
samplelpmas