10 条题解

  • 1
    @ 2025-8-5 16:18:30

    #include<bits/stdc++.h> using namespace std; int n, x; vector v; vector b; int main() { //freopen("aa.in","r",stdin); //freopen("ss.out","w",stdout); for (int i = 1; i <= 5; i++) { v.push_back(i); } cout << "1: "; for (int n = 0; n <= 4; n++) { cout << v[n] << " "; } cout << endl; for (int j = 2; j <= 10; j++) { x = v[0]; v.erase(v.begin()); v.push_back(x); cout << j << ": "; for (int m = 0; m <= 4; m++) { cout << v[m] << " "; } cout << endl; } //fclose(stdin); //fclose(stdout); return 0; } /**/

    • 1
      @ 2025-8-4 18:04:13

      #include using namespace std; int main() { int arr[5] = {1, 2, 3, 4, 5}; for (int i = 1; i <= 10; i++) { cout << i << ": "; for (int j = 0;j <5; j++) { cout << arr[j] << " "; } cout << endl; int temp = arr[0]; for (int k = 0; k < 4; k++) { arr[k] = arr[k + 1]; } arr[4] = temp; } return 0; }

      • 1
        @ 2024-11-10 16:01:57
        #include <iostream>
        using namespace std;
        
        int main() {
            int arr[5] = {1, 2, 3, 4, 5};
            for (int i = 1; i <= 10; i++) {
                cout << i << ": ";
                for (int j = 0; j < 5; j++) {
                    cout << arr[j] << " ";
                }
                cout << endl;
                int temp = arr[0];
                for (int k = 0; k < 4; k++) {
                    arr[k] = arr[k + 1];
                }
                arr[4] = temp;
            }
            return 0;
        }
        
        • -3
          @ 2024-11-10 16:02:46

          #include<bits/stdc++.h> using namespace std; int main() { cout<<"1: 1 2 3 4 5\n2: 2 3 4 5 1\n3: 3 4 5 1 2\n4: 4 5 1 2 3\n5: 5 1 2 3 4\n6: 1 2 3 4 5\n7: 2 3 4 5 1\n8: 3 4 5 1 2\n9: 4 5 1 2 3\n10: 5 1 2 3 4\n"; //请输入 return 0; }

          • -3
            @ 2024-11-10 16:02:01

            #include<bits/stdc++.h> using namespace std; int main() { cout<<"1: 1 2 3 4 5\n2: 2 3 4 5 1\n3: 3 4 5 1 2\n4: 4 5 1 2 3\n5: 5 1 2 3 4\n6: 1 2 3 4 5\n7: 2 3 4 5 1\n8: 3 4 5 1 2\n9: 4 5 1 2 3\n10: 5 1 2 3 4\n"; //请输入 return 0; }

            • -3
              @ 2024-10-2 16:12:48
              #include<bits/stdc++.h>
              using namespace std;
              int main()
              {
              	cout<<"1: 1 2 3 4 5\n2: 2 3 4 5 1\n3: 3 4 5 1 2\n4: 4 5 1 2 3\n5: 5 1 2 3 4\n6: 1 2 3 4 5\n7: 2 3 4 5 1\n8: 3 4 5 1 2\n9: 4 5 1 2 3\n10: 5 1 2 3 4\n";
              //请输入
              return 0;
              }
              
              
              • -5
                @ 2024-11-10 16:21:27

                #include<bits/stdc++.h> using namespace std; vector pig; int main() { for(int i=0;i<5;i++) { pig.push_back(i+1); }

                cout<<1<<":";
                

                for(int i=0;i<5;i++) { cout<<" "<<pig[i]; } cout<<endl; for(int y=2;y<=10;y++) { int zhu=pig[0]; pig.erase(pig.begin()); pig.push_back(zhu); cout<<y<<":"; for(int j=0;j<5;j++) { cout<<" "<<pig[j]; } cout<<endl; }

                //大神,欢迎您在这里撸码~~
                

                return 0; }

                • -5
                  @ 2024-11-10 16:02:39

                  #include<bits/stdc++.h> using namespace std; int main() { cout<<"1: 1 2 3 4 5\n2: 2 3 4 5 1\n3: 3 4 5 1 2\n4: 4 5 1 2 3\n5: 5 1 2 3 4\n6: 1 2 3 4 5\n7: 2 3 4 5 1\n8: 3 4 5 1 2\n9: 4 5 1 2 3\n10: 5 1 2 3 4\n"; //请输入 return 0; }

                  • -5
                    @ 2024-11-10 16:02:15

                    #include<bits/stdc++.h> using namespace std; int main() { cout<<"1: 1 2 3 4 5\n2: 2 3 4 5 1\n3: 3 4 5 1 2\n4: 4 5 1 2 3\n5: 5 1 2 3 4\n6: 1 2 3 4 5\n7: 2 3 4 5 1\n8: 3 4 5 1 2\n9: 4 5 1 2 3\n10: 5 1 2 3 4\n"; //请输入 return 0; }

                    • -5
                      @ 2024-11-10 16:02:08

                      #include<bits/stdc++.h> using namespace std; int main() { cout<<"1: 1 2 3 4 5\n2: 2 3 4 5 1\n3: 3 4 5 1 2\n4: 4 5 1 2 3\n5: 5 1 2 3 4\n6: 1 2 3 4 5\n7: 2 3 4 5 1\n8: 3 4 5 1 2\n9: 4 5 1 2 3\n10: 5 1 2 3 4\n"; //请输入 return 0; }

                      • 1

                      信息

                      ID
                      230
                      时间
                      1000ms
                      内存
                      64MiB
                      难度
                      7
                      标签
                      递交数
                      53
                      已通过
                      13
                      上传者