結果
| 問題 |
No.1337 Fair Otoshidama
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-01-15 21:41:44 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,003 bytes |
| コンパイル時間 | 1,393 ms |
| コンパイル使用メモリ | 168,936 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-26 13:44:23 |
| 合計ジャッジ時間 | 2,093 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 11 WA * 9 |
ソースコード
#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define rep(i, n) for(ll i=0; i<n; i++)
#define rrep(i, n) for(ll i=n-1; i>=0; i--)
#define rep2(i, a, b) for(ll i=a; i<b; i++)
#define Pii pair<int, int>
#define Pll pair<ll, ll>
#define fi first
#define se second
#define Vi vector<int>
#define VVi vector<vector<int>>
#define Vl vector<ll>
#define VVl vector<vector<ll>>
using namespace std;
string YES[2] = {"NO", "YES"};
string Yes[2] = {"No", "Yes"};
string yes[2] = {"no", "yes"};
int main(){
int x, y ,z;
cin >> x >> y >> z;
int ave=(x+y+z)/3;
bool ans=true;
//a
int sa=abs(x-ave);
if(x>ave && sa%3!=0) ans=false;
else if(x<ave && sa%2!=0) ans==false;
//b
sa=abs(y-ave);
if(y>ave && sa%1!=0) ans=false;
else if(y<ave && sa%2!=0) ans==false;
//c
sa=abs(z-ave);
if(z>ave && sa%2!=0) ans=false;
else if(z<ave && sa%3!=0) ans==false;
if(ans) cout<<Yes[1]<<endl;
else cout<<Yes[0]<<endl;
return 0;
}