mirror of
https://gitcode.com/Zengtudor/alg2025.git
synced 2025-10-29 19:42:40 +00:00
Compare commits
No commits in common. "9d948bead1f0af713be58f89862e36afc59ddd06" and "de497e2c807e733ea830c361cdde795ddc08547f" have entirely different histories.
9d948bead1
...
de497e2c80
@ -1,24 +0,0 @@
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <istream>
|
||||
using ll = int64_t;
|
||||
|
||||
#define sl static inline
|
||||
|
||||
const ll maxn = 2e5+5;
|
||||
ll n, a[maxn];
|
||||
|
||||
sl void dfs(){
|
||||
|
||||
}
|
||||
|
||||
int main(){
|
||||
std::iostream::sync_with_stdio(false);
|
||||
std::cin.tie(nullptr);
|
||||
|
||||
std::cin>>n;
|
||||
for(ll i=1;i<=n;i++){
|
||||
std::cin>>a[i];
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
#include <istream>
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
using ll = int64_t;
|
||||
|
||||
ll n,m,l;
|
||||
std::map<std::string,std::set<ll>> s;
|
||||
std::string tmp;
|
||||
|
||||
int main(){
|
||||
std::iostream::sync_with_stdio(false);
|
||||
std::cin.tie(nullptr);
|
||||
|
||||
std::cin>>n;
|
||||
for(ll i=1;i<=n;i++){
|
||||
std::cin>>l;
|
||||
for(ll j=1;j<=l;j++){
|
||||
std::cin>>tmp;
|
||||
s[tmp].insert(i);
|
||||
}
|
||||
}
|
||||
std::cin>>m;
|
||||
while(m--){
|
||||
std::cin>>tmp;
|
||||
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<<" ";
|
||||
}
|
||||
}
|
||||
std::cout<<"\n";
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user