13 条题解

  • 2
    @ 2024-3-3 11:49:23
    #include <bits/stdc++.h> 
    using namespace std; 
    int main()
    { 
    int a,b,c; 
    cin>>a>>b>>c; 
    if(a>b){ 
    swap(a,b); 
    } 
    if(a>c){
    swap(a,c); 
    } 
    if(b>c){ 
    swap(b,c); 
    } 
    cout<<a<<" "<<b<<" "<<c; 
    return 0; 
    }
    
    • 1
      @ 2024-3-16 14:58:59

      #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
        @ 2024-3-16 14:58:24

        #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
          @ 2024-3-16 14:58:03

          #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
            @ 2024-3-16 14:57:28

            #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
              @ 2024-3-16 14:56:55

              #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
                @ 2024-3-6 18:20:56

                #include <bits/stdc++.h> using namespace std; int main() { int x,b,c; cin>>x>>b>>c; if(x>b){ swap(x,b); } if(x>c){ swap(x,c); } if(b>c){ swap(b,c); } cout<<x<<" "<<b<<" "<<c; return 0; }

                • 1
                  @ 2024-3-3 10:35:23
                  #include <bits/stdc++.h> 
                  using namespace std; 
                  int main()
                  { 
                  int a,b,c; 
                  cin>>a>>b>>c; 
                  if(a>b){ 
                  swap(a,b); 
                  } 
                  if(a>c){
                  swap(a,c); 
                  } 
                  if(b>c){ 
                  swap(b,c); 
                  } 
                  cout<<a<<" "<<b<<" "<<c; 
                  return 0; 
                  }
                  
                  • 1
                    @ 2024-3-3 10:25:18

                    #include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a>b){ swap(a,b); } if(a>c){ swap(a,c); } if(b>c){ swap(b,c); } cout<<a<<" "<<b<<" "<<c; return 0; }

                    • 1
                      @ 2024-2-23 9:49:46

                      #include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a>b){ swap(a,b); } if(a>c){ swap(a,c); } if(b>c){ swap(b,c); } cout<<a<<" "<<b<<" "<<c; return 0; }

                      • -2
                        @ 2024-3-16 15:01:52

                        #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
                          @ 2024-2-28 20:21:48

                          #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; } }

                          • -3
                            @ 2024-2-22 9:41:22

                            #include <bits/stdc++.h> using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a>b) swap(a,b); if(a>c) swap(a,c); if(b>c) swap(b,c); cout<<a<<" "<<b<<" "<<c; return 0; }

                            • 1

                            信息

                            ID
                            622
                            时间
                            1000ms
                            内存
                            125MiB
                            难度
                            4
                            标签
                            (无)
                            递交数
                            314
                            已通过
                            152
                            上传者