5 条题解

  • 1
    @ 2022-10-27 17:34:03
    #include <iostream>
    #include <stack>
    #include <cmath>
    #include <vector>
    #include <string.h>
    #include <queue>
    #include <stdio.h>
    #include <iomanip>
    #include <cstdio>
    #include <algorithm>
    #define int long long
    using namespace std;
    const int N = 1e5 + 10;
    const int INF = 0x3f3f3f3f;
    int a[N];
    signed main()
    {
    	int n;
    	cin >> n;
    	for(int i = 1; i <= n; i++)
    	{
    		cin >> a[i];
    	}
    	cout << a[n];
    	for(int i = 1; i <= n - 1; i++)
    	{
    		cout << " " << a[i];
    	}
    	return 0;
    }
    

    就我的最离谱

    • 0
      #include <bits/stdc++.h>
      using namespace std;
      const int N=1e4+10;
      const int INF=0x3f3f3f3f;
      int a[N],s[N],ans,n;
      bool f;
      int main()
      {
      	cin>>n;
      	for(int i=1;i<=n;i++)
      	{
      		cin>>a[i];
      	}
      	a[0]=a[n];
      	for(int i=0;i<n;i++)
      	{
      		cout<<a[i]<<" ";
      	}
      	return 0;
      }
      
      
      • 0
        @ 2023-1-30 15:55:56

        #include <queue> #include <iostream> #include <iomanip> #include <cmath> #include <cstring> #include <string> #include <algorithm> #include <vector> using namespace std; int main() { int n; cin >> n; int a[n+1]; for(int i=1;i<=n;i++) { cin >> a[i]; } for(int i=n;i>=1;i--) { a[i+1] = a[i]; } a[1] = a[n+1]; for(int i=1;i<=n;i++) { cout << a[i] << " "; } return 0; }

        • 0
          @ 2022-7-12 11:28:52

          #include<bits/stdc++.h>

          #include <queue>

          #include <math.h>

          #include <stack>

          #include <stdio.h>

          #include <iostream>

          #include <vector>

          #include <iomanip>

          #include <string.h>

          #include <algorithm>

          using namespace std;

          #define LL long long

          const int N = 1e5 + 10;

          const int INF = 0x3f3f3f3f;

          using namespace std;

          int a[10000];

          int main()

          { long long a[10000] , n;

          cin >> n;
          
          for(long long i = 1 ; i <= n ; i++)//
          
          	cin >> a[i];
          
          cout << a[n] << " ";
          
          for(long long i = 1 ; i <= n - 1 ; i++)//
          
          	cout << a[i] << " ";
          
          return 0;
          

          }

          • 0
            @ 2022-3-20 21:03:48
            #include <stdio.h>
            #include <string.h>
            #include <math.h>
            #include <iostream>
            using namespace std;
            double a [10000];
            int main()
            {
            	int a[100000],n;
            	cin >> n;
            	for(int i = 1 ; i <= n ; i++)
            		cin >> a[i];
            	cout << a[n] << " ";
            	for(int i = 1 ; i <= n ; i++)
            		cout << a[i] << " ";
            }
            
            • 1

            信息

            ID
            1016
            时间
            1000ms
            内存
            128MiB
            难度
            3
            标签
            递交数
            393
            已通过
            197
            上传者