結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
monnu
|
| 提出日時 | 2020-05-26 21:54:26 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 660 bytes |
| コンパイル時間 | 1,449 ms |
| コンパイル使用メモリ | 165,900 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-13 03:02:27 |
| 合計ジャッジ時間 | 2,386 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 38 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
using Graph=vector<vector<pair<int,int>>>;
#define INF 1000000000000000000
#define MOD 1000000007
int main(){
unsigned int a,b,x,N;
cin>>a>>b>>x>>N;
if(x%2==0){
if(a%2==0&&b%2==0){
cout<<N/2<<" "<<N/2<<endl;
}else if(a%2==0){
cout<<"0 0"<<endl;
}else if(b%2==0){
cout<<N/2<<" "<<N/2<<endl;
}else{
cout<<0<<" "<<N/2<<endl;
}
}else{
if(a%2==0&&b%2==0){
cout<<N/2<<" "<<N/2<<endl;
}else if(a%2==0){
cout<<"0 0"<<endl;
}else if(b%2==0){
cout<<0<<" "<<0<<endl;
}else{
cout<<N/2<<" "<<0<<endl;
}
}
}
monnu