結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2020-03-24 14:59:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 469 bytes |
| コンパイル時間 | 1,996 ms |
| コンパイル使用メモリ | 167,484 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-31 15:02:49 |
| 合計ジャッジ時間 | 3,292 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 38 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long a, b, x0, N;
cin >> a >> b >> x0 >> N;
long long ans = (N * 2 - 1 + 2) / 4;
long long ans1 = 0;
long long ans2 = 0;
if( a % 2 == 0 ) {
if( b % 2 == 0 ) {
ans1 = ans;
ans2 = ans;
}
}
else {
if( b % 2 == 0 ) {
if( x0 % 2 == 0 ) {
ans1 = ans;
ans2 = ans;
}
}
else {
if( x0 % 2 ) ans1 = ans;
else ans2 = ans;
}
}
cout << ans1 << " " << ans2 << endl;
}
forest3