結果
| 問題 |
No.1337 Fair Otoshidama
|
| コンテスト | |
| ユーザー |
mag
|
| 提出日時 | 2021-01-25 22:52:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 592 bytes |
| コンパイル時間 | 1,546 ms |
| コンパイル使用メモリ | 168,136 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-06-22 19:21:38 |
| 合計ジャッジ時間 | 16,796 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 TLE * 1 |
| other | AC * 3 WA * 14 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<<a<<" "<<b<<" "<<c<<endl;
cout<<"No"<<endl;
}
mag