标签:元素 line names clu str 类型 tchar first cst
#include <map> #include <iostream> #include <cstdio> #include <cctype> using namespace std; typedef long long ll; map< ll, ll > mp; 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++) { ll x=read(),y=read(); mp[x]=y; } for(map < ll , ll >::iterator it=mp.begin();it!=mp.end();it++){ printf("mp[%lld]->%lld\n",it->first,it->second); } return 0; //map< type1 , type2 >mp 两个类型 mp[type1]=type2 //mp.clear() 清空map //mp.count(type1) 查找有没有这个元素 }
标签:元素 line names clu str 类型 tchar first cst
原文地址:https://www.cnblogs.com/qf-breeze/p/10341203.html