首页 > 其他 > 详细

list

时间:2019-01-31 11:59:21      阅读:128      评论:0      收藏:0      [点我收藏+]
#include <list>
#include <iostream>
#include <cstdio>
#include <cctype>
using namespace std;
typedef long long ll;
list < ll > l;
inline ll read () {
    ll x=0,f=1;
    char ch=getchar();
    while(!isdigit(ch)) {
        if(ch==-) f=-1;
        ch=getchar();
    }
    while(isdigit(ch)) {
        x=(x<<1)+(x<<3)+(ch^48);
        ch=getchar();
    }
    return x*f;
}
int n;
signed main() {
    n=read();
    for(register int i=1; i<=n; i++) l.push_back(read());
    for(list < ll >::iterator it=l.begin(); it!=l.end(); it++) cout<<*it<< ;
    return 0;
//l.sort(); 自带排序
//https://blog.csdn.net/zhouzhenhe2008/article/details/77428743/
}

list

原文:https://www.cnblogs.com/qf-breeze/p/10341196.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!