当前位置:网站首页>Simple score statistics
Simple score statistics
2022-06-11 12:41:00 【whitewall_ nine】
#include<bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for(int i=(l);i<=(r);i++)
#define per(i,l,r) for(int i=(l);i>=(r);i--)
#define ll long long
#define pii pair<int, int>
#define mset(s,t) memset(s,t,sizeof(t))
#define mcpy(s,t) memcpy(s,t,sizeof(t))
#define fi first
#define se second
#define pb push_back
#define all(x) (x).begin(),(x).end()
#define SZ(x) ((int)(x).size())
#define mp make_pair
const ll mod = 1e9 + 7;
inline ll qmi (ll a, ll b) {
ll ans = 1;
while (b) {
if (b & 1) ans = ans * a%mod;
a = a * a %mod;
b >>= 1;
}
return ans;
}
inline int read () {
int x = 0, f = 0;
char ch = getchar();
while (!isdigit(ch)) f |= (ch=='-'),ch= getchar();
while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
return f?-x:x;
}
template<typename T> void print(T x) {
if (x < 0) putchar('-'), x = -x;
if (x >= 10) print(x/10);
putchar(x % 10 + '0');
}
inline ll sub (ll a, ll b) {
return ((a - b ) %mod + mod) %mod;
}
inline ll add (ll a, ll b) {
return (a + b) %mod;
}
inline ll inv (ll a) {
return qmi(a, mod - 2);
}
int n, m, k;
map<string, int> grade, name;
vector<string> id;
void solve() {
cin >> n >> m >> k;
rep(i, 1, n) {
string s;
cin >> s;
id.pb(s);
}
for (int i= 0; i < m; i ++) {
string a;
int b;
cin >> a >> b;
grade[a] = b;
}
for (int i = 0; i < k; i ++) {
string a, b, c;
cin >> a >> b >> c;
if (c == "AC") {
name[a] += grade[b];
}
}
for (auto t : id) {
cout << t << " " << name[t] << endl;
}
}
int main () {
int t;
t =1;
//cin >> t;
while (t --) solve();
return 0;
}
use map Saving points is very convenient
边栏推荐
- 机械设备制造企业,如何借助ERP系统做好委外加工管理?
- Gocron scheduled task management platform
- 2022 vmvare download and installation tutorial on the latest official website (ultra detailed)
- Where is it safer to open an account for soda ash futures? How much is the margin for soda ash futures?
- 秒杀中的验证码安全机制
- 室内场馆现代化的三大要点
- STM32 development of practical series 7-data Porter DMA
- Workload management of Splunk best practices
- Where is it safer to open an account for soda ash futures? How much is the margin for soda ash futures?
- Flick scrolling window, sliding window, session window, global window
猜你喜欢

(recommended) how many splunks are appropriate? Search head

Acwing50+acwing51 weeks +acwing3493 Maximum sum (open)

馆客多游泳馆会员管理系统可以实现哪些场景?

Oracle 将数据导出到CSV(Excel)文件的方法

Troubleshoot Splunk kvstore "starting"

How to optimize SEO on the mobile terminal? Do you need to optimize GoogleSEO on the mobile terminal for a separate m domain name?

科海融生&正航,以信息化驱动管理升级,携手共迎数智未来

9、聊聊ThreadLocal

7. CAS

Some common websites
随机推荐
记录一次jvm GC过程
Mctalk's entrepreneurial voice - erudition and discernment: be interested in socializing, and provide a "small and beautiful" space for old friends before and after retirement
Yarn switch ResourceManager (failed to connect to server:8032 retries get failed due to exceeded maximum)
CMD of Jerry's AI protocol_ SET_ BLE_ Format of visibility command [chapter]
Oracle DatabaseLink cross database connection
非标自动化设备制造企业,如何借助ERP系统实现快速精准报价?
Flink window table valued function
换种方式实现阖家团圆,2022旗舰投影坚果J10S被种草
(solve) the kV store down problem of Splunk
Record a CODIS memory cleanup
Unity game protection "big training", read and understand the game's pre defense
Wechat applet startup page automatically jumps
After Oracle deletes a user, it can still use the user to log in
oracle删除用户后,却还可以使用该用户登录
Flash framework web development video notes
Another way to achieve family reunion, 2022 flagship projection nut j10s is planted with grass
12. AQS of abstractqueuedsynchronizer
美创科技数据安全管理平台荣获2022数博会“领先科技成果奖”
电商发展的演变
8. 18 arhat enhancements for atomic operations