1 solutions
-
0
#include<bits/stdc++.h> using namespace std; typedef long long ll; const ll INF = 0x3f3f3f3f3f3f3f3f; const int N = 2e6+11, P = 998244353; ll n, m, a[N], s[N], ss[N]; void work(){ ll x, y, z, w, k, a, b, c, d; cin>>a>>b>>c>>d>>k; while(k--){ x = (b + c + d) / 3; y = (a + c + d) / 3; z = (a + b + d) / 3; w = (a + b + c) / 3; a = x, b = y, c = z, d = w; if(x == y && y == z && z == w) {cout<<x<<' '<<y<<' '<<z<<' '<<w<<endl; return;} } cout<<a<<' '<<b<<' '<<c<<' '<<d<<endl; } int main(){ ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); int t = 1; // cin>>t; while(t--) work(); return 0; }
Information
- ID
- 543
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 10
- Tags
- (None)
- # Submissions
- 137
- Accepted
- 3
- Uploaded By