1 solutions
-
0
C++ :
#include<bits/stdc++.h> using namespace std; string x,a[100]; int n,t; int main() { // freopen("1.in","r",stdin); // freopen("1.out","w",stdout); cin>>n; for(int i=0;i<n;i++) { cin>>x; if(x.size()%3==0) cout<<x<<" ",a[t++]=x; } cout<<endl; sort(a,a+t); for(int i=0;i<t;i++) cout<<a[i]<<" "; return 0; }
- 1
Information
- ID
- 1071
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By