Input
2 2 4
Kujoh
VanhG
metebronca 100
geometry 200
VanhG metebronca AC
phund geometry AC
Kujoh geometry WA
VanhG geometry AC
Output
Kujoh 0
VanhG 300
c++, vãi cả đề :_)
Hãy luôn nhớ cảm ơn và vote 5*
nếu câu trả lời hữu ích nhé!
`\color{pink}{#Quỳnh.Anh౨ৎ}`
#include <bits/stdc++.h>
#define F(i,a,b) for(int i=a;i<b;i++)
using namespace std;
int main(){
ios::sync_with_stdio(0);cin.tie(0);
int c,p,s;cin>>c>>p>>s;
vector<string> a(c);F(i,0,c) cin>>a[i];
map<string,int> b;F(i,0,p){string x;int y;cin>>x>>y;b[x]=y;}
map<string,set<string>> d;
map<string,int> e;
F(i,0,s){
string u,v,t;cin>>u>>v>>t;
if(t=="AC"&&!d[u].count(v)){
e[u]+=b[v];
d[u].insert(v);
}
}
F(i,0,c) cout<<a[i]<<" "<<e[a[i]]<<"\n";
}
`\color{#1AD5F7}{꧁⋆⟡T}\color{#1AD5F7}{D}\color{#4DA6E6}{u}\color{#668EDD}{n}\color{#8077D5}{g}\color{#B28DFF}{\ }\color{#995FCD}{G}\color{#EA2F90}{M⟡⋆꧂}`
Hãy giúp mọi người biết câu trả lời này thế nào?
Bảng tin
1
228
1
sai r a
1
228
1
sai r ạ
1358
4743
1008
mik nộp lộn á
1358
4743
1008
đợi mik 1-2 p ạ
1
228
1
dc co 63.33 a bn