13 条题解
-
1
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a<b and b<c) cout<<a<<" "<<b<<" "<<c; if(a<c and c<b) cout<<a<<" "<<c<<" "<<b; if(c<b and b<a) cout<<c<<" "<<b<<" "<<a; if(c<a and a<b) cout<<c<<" "<<a<<" "<<b; if(b<a and a<c) cout<<b<<" "<<a<<" "<<c; if(b<c and c<a) cout<<b<<" "<<c<<" "<<a; if(ab and b<c) cout<<a<<" "<<b<<" "<<c; if(ac and c<b) cout<<a<<" "<<c<<" "<<b; if(cb and b<a) cout<<c<<" "<<b<<" "<<a; if(ab and c<b and c<a) cout<<c<<" "<<a<<" "<<b; if(ac and b<a and b<c) cout<<b<<" "<<a<<" "<<c; if(cb and a<b and a<c) cout<<a<<" "<<c<<" "<<b; if(bc and ca) cout<<a<<" "<<b<<" "<<c; }
-
1
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a<b and b<c) cout<<a<<" "<<b<<" "<<c; if(a<c and c<b) cout<<a<<" "<<c<<" "<<b; if(c<b and b<a) cout<<c<<" "<<b<<" "<<a; if(c<a and a<b) cout<<c<<" "<<a<<" "<<b; if(b<a and a<c) cout<<b<<" "<<a<<" "<<c; if(b<c and c<a) cout<<b<<" "<<c<<" "<<a; if(ab and b<c) cout<<a<<" "<<b<<" "<<c; if(ac and c<b) cout<<a<<" "<<c<<" "<<b; if(cb and b<a) cout<<c<<" "<<b<<" "<<a; if(ab and c<b and c<a) cout<<c<<" "<<a<<" "<<b; if(ac and b<a and b<c) cout<<b<<" "<<a<<" "<<c; if(cb and a<b and a<c) cout<<a<<" "<<c<<" "<<b; if(bc and ca) cout<<a<<" "<<b<<" "<<c; }
-
1
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a<b and b<c) cout<<a<<" "<<b<<" "<<c; if(a<c and c<b) cout<<a<<" "<<c<<" "<<b; if(c<b and b<a) cout<<c<<" "<<b<<" "<<a; if(c<a and a<b) cout<<c<<" "<<a<<" "<<b; if(b<a and a<c) cout<<b<<" "<<a<<" "<<c; if(b<c and c<a) cout<<b<<" "<<c<<" "<<a; if(ab and b<c) cout<<a<<" "<<b<<" "<<c; if(ac and c<b) cout<<a<<" "<<c<<" "<<b; if(cb and b<a) cout<<c<<" "<<b<<" "<<a; if(ab and c<b and c<a) cout<<c<<" "<<a<<" "<<b; if(ac and b<a and b<c) cout<<b<<" "<<a<<" "<<c; if(cb and a<b and a<c) cout<<a<<" "<<c<<" "<<b; if(bc and ca) cout<<a<<" "<<b<<" "<<c; }
-
1
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a<b and b<c) cout<<a<<" "<<b<<" "<<c; if(a<c and c<b) cout<<a<<" "<<c<<" "<<b; if(c<b and b<a) cout<<c<<" "<<b<<" "<<a; if(c<a and a<b) cout<<c<<" "<<a<<" "<<b; if(b<a and a<c) cout<<b<<" "<<a<<" "<<c; if(b<c and c<a) cout<<b<<" "<<c<<" "<<a; if(ab and b<c) cout<<a<<" "<<b<<" "<<c; if(ac and c<b) cout<<a<<" "<<c<<" "<<b; if(cb and b<a) cout<<c<<" "<<b<<" "<<a; if(ab and c<b and c<a) cout<<c<<" "<<a<<" "<<b; if(ac and b<a and b<c) cout<<b<<" "<<a<<" "<<c; if(cb and a<b and a<c) cout<<a<<" "<<c<<" "<<b; if(bc and ca) cout<<a<<" "<<b<<" "<<c; }
-
1
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a<b and b<c) cout<<a<<" "<<b<<" "<<c; if(a<c and c<b) cout<<a<<" "<<c<<" "<<b; if(c<b and b<a) cout<<c<<" "<<b<<" "<<a; if(c<a and a<b) cout<<c<<" "<<a<<" "<<b; if(b<a and a<c) cout<<b<<" "<<a<<" "<<c; if(b<c and c<a) cout<<b<<" "<<c<<" "<<a; if(ab and b<c) cout<<a<<" "<<b<<" "<<c; if(ac and c<b) cout<<a<<" "<<c<<" "<<b; if(cb and b<a) cout<<c<<" "<<b<<" "<<a; if(ab and c<b and c<a) cout<<c<<" "<<a<<" "<<b; if(ac and b<a and b<c) cout<<b<<" "<<a<<" "<<c; if(cb and a<b and a<c) cout<<a<<" "<<c<<" "<<b; if(bc and ca) cout<<a<<" "<<b<<" "<<c; }
-
-2
#include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a<b and b<c) cout<<a<<" "<<b<<" "<<c; if(a<c and c<b) cout<<a<<" "<<c<<" "<<b; if(c<b and b<a) cout<<c<<" "<<b<<" "<<a; if(c<a and a<b) cout<<c<<" "<<a<<" "<<b; if(b<a and a<c) cout<<b<<" "<<a<<" "<<c; if(b<c and c<a) cout<<b<<" "<<c<<" "<<a; if(ab and b<c) cout<<a<<" "<<b<<" "<<c; if(ac and c<b) cout<<a<<" "<<c<<" "<<b; if(cb and b<a) cout<<c<<" "<<b<<" "<<a; if(ab and c<b and c<a) cout<<c<<" "<<a<<" "<<b; if(ac and b<a and b<c) cout<<b<<" "<<a<<" "<<c; if(cb and a<b and a<c) cout<<a<<" "<<c<<" "<<b; if(bc and ca) cout<<a<<" "<<b<<" "<<c; }
-
-3
#include<bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a>b and b>c){ cout<<c<<" "<<b<<" "<<a; } if(a>c and c>b){ cout<<b<<" "<<c<<" "<<a; } if(b>a and a>c){ cout<<c<<" "<<a<<" "<<b; } if(b>c and c>a){ cout<<a<<" "<<c<<" "<<b; } if(c>a and a>b){ cout<<b<<" "<<a<<" "<<c; } if(c>b and b>a){ cout<<a<<" "<<b<<" "<<c; } if(cb and ca){ cout<<a<<" "<<a<<" "<<a; } }
- 1
信息
- ID
- 622
- 时间
- 1000ms
- 内存
- 125MiB
- 难度
- 4
- 标签
- (无)
- 递交数
- 314
- 已通过
- 152
- 上传者