refactor(P3879.cpp): 显式声明迭代器类型以增强代码可读性

将auto替换为具体的迭代器类型声明,使代码意图更清晰
This commit is contained in:
Zengtudor 2025-10-12 09:49:31 +08:00
parent 63a72b5f14
commit 9d948bead1

View File

@ -25,7 +25,7 @@ int main(){
std::cin>>m;
while(m--){
std::cin>>tmp;
if(const auto p = s.find(tmp);p!=s.end()){
if(std::map<std::string,std::set<ll>>::const_iterator p = s.find(tmp);p!=s.end()){
for(const ll i:p->second){
std::cout<<i<<" ";
}