結果
問題 | No.1337 Fair Otoshidama |
ユーザー |
![]() |
提出日時 | 2021-01-25 22:53:40 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 559 bytes |
コンパイル時間 | 1,618 ms |
コンパイル使用メモリ | 166,964 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-22 19:22:24 |
合計ジャッジ時間 | 16,456 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 TLE * 1 |
other | AC * 7 WA * 10 TLE * 3 |
ソースコード
#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;}