4 条题解
-
2
正难则反
#include<bits/stdc++.h> #define ll long long #define R register #define F(i,a,b) for(int i = (a);i<=(b);i++) using namespace std; inline int read(){R int x=0,t=1;R char ch=getchar();while(ch<'0'||ch>'9'){if(ch=='-') t=-1;ch=getchar();}while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+(ch^48);ch=getchar();}return x*t;} const int N=2e5+10; signed main() { int n=read(); int x,y,z; x=y=z=n/3; z+=(x/2+y/2); x/=2; y/=2; y+=(x/2+z/2); x/=2; z/=2; x+=(y/2+z/2); y/=2; z/=2; cout << x << " " << y << " " << z << '\n'; return 0; } /* */
信息
- ID
- 538
- 时间
- 1000ms
- 内存
- 64MiB
- 难度
- 8
- 标签
- 递交数
- 139
- 已通过
- 22
- 上传者