发布时间:2014-11-19 09:25:39
#include #include #include using namespace std;int gcd(int x,int y){ int m; if (x......【阅读全文】
发布时间:2014-11-19 09:23:23
for (int i=n-1;i>=0;i--){ if (i==0) cout<<a[i]; else cout<<a[i]<<" ";}cout <<endl;......【阅读全文】
发布时间:2014-11-19 09:19:27
while (cin>>n) { a=new int[n]; for (int i=0;i<n;i++) sca.........【阅读全文】
发布时间:2014-11-19 09:14:19
Sort在STL中的容器中很常用,因为我是ACM的,做那些题如果用STL的话很可能超出时间限制,所以把Sort用到数组上还是挺好的。所以直接 int a[]={1,3,2,5,6}; sort(a,a+4); cout <<a[0]<.........【阅读全文】