3 条题解

  • 1
    @ 2024-1-31 12:08:44

    有必要考吗

    #include <bits/stdc++.h>
    using namespace std;
    int n;
    string s[15];
    int main(){
        cin>>n;
        for (int i=0;i<n;i++)cin>>s[i];
        sort(s,s+n);
        for (int i=0;i<n;i++)cout<<s[i]<<" ";
        return 0;
    }
    
    • 1
      @ 2023-8-10 8:30:19
      #include <bits/stdc++.h>
      using namespace std;
      string s[11];
      int n;
      int main()
      {
          cin >> n;
          for (int i = 1;i <= n;i++) cin >> s[i];
          sort(s + 1,s + n + 1);
          for (int i = 1;i <= n;i++) cout << s[i] << " ";
      }
      
      • 1
        @ 2023-8-9 10:18:31

        简单

        #include <bits/stdc++.h>
        using namespace std;
        string s[11];
        int n;
        int main()
        {
            cin >> n;
            for (int i = 1;i <= n;i++) cin >> s[i];
            sort(s + 1,s + n + 1);
            for (int i = 1;i <= n;i++) cout << s[i] << " ";
        }
        
        • 1

        信息

        ID
        167
        时间
        1000ms
        内存
        16MiB
        难度
        1
        标签
        递交数
        47
        已通过
        38
        上传者