結果

問題 No.1337 Fair Otoshidama
ユーザー magmag
提出日時 2021-01-25 22:53:40
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 559 bytes
コンパイル時間 1,605 ms
コンパイル使用メモリ 165,064 KB
実行使用メモリ 4,388 KB
最終ジャッジ日時 2023-09-04 21:54:30
合計ジャッジ時間 13,542 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,384 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,384 KB
testcase_03 WA -
testcase_04 AC 1 ms
4,384 KB
testcase_05 AC 1 ms
4,380 KB
testcase_06 WA -
testcase_07 AC 1 ms
4,380 KB
testcase_08 WA -
testcase_09 AC 1 ms
4,384 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2 ms
4,380 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 1,781 ms
4,384 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 2 ms
4,384 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 1 ms
4,380 KB
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>

using namespace std;
using ll=long long;
#define rep2(i, a, n) for(int i = (a); i < (n); i++)
#define rep(i, n) rep2(i,0,n)

int main(){
  cin.tie(nullptr);ios_base::sync_with_stdio(false);
  int x,y,z;cin>>x>>y>>z;
  int a=x+100,b=y+100,c=z+100;
  rep(i,1e9){
    if(a==b&&b==c){
      cout<<"Yes"<<endl;
      return 0;
    }else if(a<0||b<0||c<0){
      break;
    }
    if(i%3==0){
      a+=1;
      b-=1;
    }else if(i%3==1){
      b+=2;
      c-=2;
    }else if(i%3==2){
      c+=3;
      a-=3;
    }
  }
  cout<<"No"<<endl;
}
0