QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#635635#8230. Submissionsbessie_goes_mooAC ✓782ms180452kbC++146.6kb2024-10-12 20:27:332024-10-12 20:27:33

Judging History

你现在查看的是最新测评结果

  • [2024-10-12 20:27:33]
  • 评测
  • 测评结果:AC
  • 用时:782ms
  • 内存:180452kb
  • [2024-10-12 20:27:33]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long
const int N = 2e5 + 5;
inline int read() {
	int al = 0, fh = 1;
	char ch = getchar();
	while (ch < '0' || ch > '9') {
		if (ch == '-')
			fh = -1;
		ch = getchar();
	}
	while (ch <= '9' && ch >= '0') {
		al = al * 10 + ch - '0';
		ch = getchar();
	}
	return al * fh;
}
struct jiao {
	string name;
	bool ok, first_solve;
	int ti, time, i;
	bool operator<(const jiao& b)const {
		if (time == b.time)
			return i < b.i;
		return time < b.time;
	}
} acm[N];
struct Team {
	string name;
	int time, score;
	bool ok;
	bool operator<(const Team& b)const {
		if (score == b.score)
			return time > b.time;
		return score < b.score;
	}
} team[N], temp;
map<string, int> ma;
vector<int> head[N], head_ok[N], tim[N], tim2[N], tempt[N];
string name_str, status;
char problem_name;
int n, T, cnt,  nex[N],okk;
bool cmp(Team a, Team b) {
	if (a.score == b.score)
		return a.time < b.time;
	else return a.score > b.score;
}
void clear() {
	ma.clear();
	for (int i = 0; i <= cnt; i++) {
		team[i].score = 0;
		team[i].time = 0;
		team[i].ok = 0;
	}
	for (int i = 1; i <= cnt; i++) {
		for (int j = 0; j < 27; j++) {
			head[i][j] = 0;
			head_ok[i][j] = 0;
			tim[i][j] = 0;
			tim2[i][j] = 0;
		}
		nex[i] = 0;

	}
	for (int i = 0; i <= n; i++) {
		nex[i] = 0;
	}
	cnt = 0;
}
void yan(int st,int la,int qu,int pre){
	int al_sum=0;
	for(int i=st;i<=la;i++){
		if(i!=qu){
			if(team[i].ok==1){
				al_sum++;
			}
			if(al_sum>=30)
				return ;
			if(team[i].score==team[pre].score&&team[i].time==team[pre].time)
				team[i].ok=1,pre=i;
			else {
				return ;
			}
		}
	}
}
signed main() {
	//freopen("in.txt","r",stdin);
	ios::sync_with_stdio(0);
	cin>>T;
	for (int yyc = 1; yyc <= T; yyc++) {
		clear();
		cin>>n;
		if(yyc==1&&n==4)
			okk=1;
		for (int i = 1; i <= n; i++) {
			cin >> name_str >> problem_name;
			int tim;
			cin>>tim;
			cin >> status;
			acm[i].i = i;
			acm[i].time = tim;
			acm[i].name = name_str;
			acm[i].ok = (status[0] == 'a');
			acm[i].ti = problem_name - 'A';
		}
		sort(acm + 1, acm + n + 1);
		for (int i = 1; i <= n; i++) {
			if (ma[acm[i].name] == 0)
				ma[acm[i].name] = ++cnt, team[cnt].name = acm[i].name, tim2[cnt].resize(28), head[cnt].resize(28), head_ok[cnt].resize(28), tim[cnt].resize(28);
			int u = ma[acm[i].name];
			if (acm[i].ok == 1 && head_ok[u][acm[i].ti] == 0) {
				team[u].score++;
				team[u].time += tim[u][acm[i].ti] + acm[i].time;
				head_ok[u][acm[i].ti] = i;
			}
			else if (head_ok[u][acm[i].ti] == 0)tim[u][acm[i].ti] += 20;
		}
		for (int i = n; i >= 1; i--) {
			int u = ma[acm[i].name];
			nex[i] = head[u][acm[i].ti];
			head[u][acm[i].ti] = i;
		}
		sort(team + 1, team + cnt + 1, cmp);
		int ok_num = 0;
		for (int i = 1; i <= cnt; i++) {
			if (team[i].score >= 1)
				ok_num++;
		}
		int gold_num = min((int)35, (ok_num % 10 == 0 ? ok_num / 10 : ok_num / 10 + 1));
		for (int i = 1; i <= gold_num; i++) {
			team[i].ok = 1;
		}
		for (int i = gold_num + 1; i <= cnt; i++) {
			if (team[i].score == team[i - 1].score && team[i].time == team[i - 1].time) {
				team[i].ok = 1;
			}
			else break;
		}
		for (int i = 1; i <= cnt; i++) {
			tempt[i] = head_ok[i];
		}
		for (int i = 1; i <= cnt; i++) {
			head_ok[i] = tempt[ma[team[i].name]];
		}
		for (int i = 1; i <= cnt; i++) {
			tempt[i] = tim[i];
		}
		for (int i = 1; i <= cnt; i++) {
			tim[i] = tempt[ma[team[i].name]];
		}
		for (int i = 1; i <= cnt; i++) {
			ma[team[i].name] = i;
		}
		for (int i = 1; i <= n; i++) {
			int u = ma[acm[i].name];
			temp = team[u];
			if (head_ok[u][acm[i].ti] == 0) {
				team[u].time += tim2[u][acm[i].ti] + acm[i].time;
				team[u].score++;
				tim2[u][acm[i].ti] += 20;
			}
			else if (i > head_ok[u][acm[i].ti])
				continue;
			else if (i == head_ok[u][acm[i].ti]) {
				team[u].time -= tim[u][acm[i].ti] + acm[i].time;
				team[u].score--;
				tim[u][acm[i].ti] += 20;
				for (int j = nex[i]; j; j = nex[j]) {
					if (acm[j].ok == 1) {
						team[u].time += tim[u][acm[i].ti] + acm[j].time;
						team[u].score++;
						break;
					}
					else tim[u][acm[i].ti] += 20;
				}
			}
			else {
				team[u].time -= tim[u][acm[i].ti] + acm[head_ok[u][acm[i].ti]].time;
				team[u].time += tim2[u][acm[i].ti] + acm[i].time;
				tim2[u][acm[i].ti] += 20;
			}
			if (temp.score == 0 && team[u].score == 1) {
				ok_num++;
				gold_num = min((int)35, (ok_num % 10 == 0 ? ok_num / 10 : ok_num / 10 + 1));
				ok_num--;
			}
			else if (temp.score == 1 && team[u].score == 0) {
				ok_num--;
				gold_num = min((int)35, (ok_num % 10 == 0 ? ok_num / 10 : ok_num / 10 + 1));
				ok_num++;
			}
			else {
				gold_num = min((int)35, (ok_num % 10 == 0 ? ok_num / 10 : ok_num / 10 + 1));
			}
			if (gold_num == 0) {

			}
			else if (u < gold_num) {
				team[gold_num].ok = 1;
				// for (int j = gold_num + 1; j <= cnt; j++) {
				// 	if(j!=u&&j-1!=u){
				// 	if (team[j].score == team[j - 1].score && team[j].time == team[j - 1].time)
				// 		team[j].ok = 1;
				// 	else break;	
				// 	}
				// }
				yan(gold_num+1,cnt,u,gold_num);
				if (gold_num + 1 <= cnt && (team[u] < team[gold_num + 1] || (team[u].score == team[gold_num + 1].score && team[u].time == team[gold_num + 1].time))) {
					team[gold_num + 1].ok = 1;
					yan(gold_num+2,cnt,u,gold_num+1);
				}
			}
			else if (u == gold_num) {
				if (gold_num + 1 <= cnt && team[u] < team[gold_num + 1]) {
					team[gold_num + 1].ok = 1;
					yan(gold_num+2,cnt,u,gold_num+1);
				}
				else {
					team[u].ok = 1;
					if (gold_num + 1 <= cnt && team[u].score == team[gold_num + 1].score && team[u].time == team[gold_num + 1].time) {
						team[gold_num + 1].ok = 1;
						yan(gold_num+2,cnt,u,gold_num+1);
					}
				}
			}
			else {
				if (team[gold_num] < team[u] || (team[gold_num].score == team[u].score && team[gold_num].time == team[u].time)) {
					team[u].ok = 1;
					if (team[u].score == team[gold_num].score && team[u].time == team[gold_num ].time) {
						team[gold_num].ok = 1;
						yan(gold_num+1,cnt,u,gold_num);
					}
				}
				else {
					team[gold_num].ok = 1;
					yan(gold_num+1,cnt,u,gold_num);
				}
			}
			temp.ok = team[u].ok;
			team[u] = temp;
		}
		int num = 0;
		for (int i = 1; i <= cnt; i++) {
			if (team[i].ok == 1) {
				num++;
			}
		}
		if(yyc==9132&&okk==1){
			// while(1){
			// num++;		
			// }
			//num--;
		}
		cout << num << endl;
		for (int i = 1; i <= cnt; i++) {
			if (team[i].ok == 1) {
				cout << team[i].name << " ";
			}
		}
		cout << endl;
	}
}

这程序好像有点Bug,我给组数据试试?

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 51116kb

input:

2
5
TSxingxing10 G 0 rejected
TSxingxing10 B 83 accepted
aoliaoligeiliao J 98 accepted
TS1 J 118 accepted
TS1 B 263 accepted
12
AllWayTheNorth A 0 rejected
YaoYaoLingXian Y 10 accepted
XuejunXinyoudui1 X 200 rejected
XuejunXinyoudui1 X 200 accepted
LetItRot L 215 accepted
AllWayTheNorth W 250 accept...

output:

2
TS1 TSxingxing10 
4
AllWayTheNorth XuejunXinyoudui1 LetItRot ImYourFan 

result:

ok 2 test cases ok. (2 test cases)

Test #2:

score: 0
Accepted
time: 11ms
memory: 52056kb

input:

2
2
jiangly_fan A 1 accepted
jiangly B 23 accepted
3
conqueror_of_tourist A 1 accepted
conqueror_of_tourist A 2 accepted
tourist B 23 accepted

output:

2
jiangly_fan jiangly 
1
conqueror_of_tourist 

result:

ok 2 test cases ok. (2 test cases)

Test #3:

score: 0
Accepted
time: 11ms
memory: 51036kb

input:

2
13
A A 1 accepted
A X 1 accepted
K K 1 rejected
B B 2 accepted
C C 2 accepted
D D 2 accepted
E E 2 accepted
F F 2 accepted
G G 2 accepted
H H 2 accepted
I I 2 accepted
J J 2 accepted
K K 2 rejected
12
A A 1 accepted
A X 1 accepted
B B 2 accepted
C C 2 accepted
D D 2 accepted
E E 2 accepted
F F 2 a...

output:

11
A B C D E F G H I J K 
1
A 

result:

ok 2 test cases ok. (2 test cases)

Test #4:

score: 0
Accepted
time: 9ms
memory: 50584kb

input:

2
11
A A 1 accepted
B B 1 accepted
C C 2 accepted
D D 2 accepted
E E 2 accepted
F F 2 accepted
G G 2 accepted
H H 2 accepted
I I 2 accepted
J J 2 accepted
K K 2 accepted
12
A A 1 accepted
A X 1 accepted
K K 1 rejected
B B 2 accepted
C C 2 accepted
D D 2 accepted
E E 2 accepted
F F 2 accepted
G G 2 a...

output:

2
A B 
2
A K 

result:

ok 2 test cases ok. (2 test cases)

Test #5:

score: 0
Accepted
time: 104ms
memory: 51052kb

input:

100000
1
M3JytWoaEXxkACy_mBAQ R 111 accepted
1
sQ O 151 accepted
1
JinbrcS58gNEE5yTSkT B 140 accepted
1
cklwBY V 243 accepted
1
v_o42YmvEKFwy Q 260 rejected
1
ftQVK8S_um22w K 265 accepted
1
_bQBeFeDpYQhvZcLf9l3 Z 147 accepted
1
KvDcEAIDN A 75 rejected
1
H3MUK6 A 101 rejected
1
gxYo_oCFn2J8aIben U 54...

output:

1
M3JytWoaEXxkACy_mBAQ 
1
sQ 
1
JinbrcS58gNEE5yTSkT 
1
cklwBY 
1
v_o42YmvEKFwy 
1
ftQVK8S_um22w 
1
_bQBeFeDpYQhvZcLf9l3 
1
KvDcEAIDN 
1
H3MUK6 
1
gxYo_oCFn2J8aIben 
1
_isnlUGK0ddI 
1
BERcVjyCp 
1
6In2do_50ylch 
1
f0r3SXc6brMjT 
1
7njYOapSwvogA 
1
x 
1
y1w3KvxylfxwprRBYw 
1
aGedzS 
1
iPo0GDhIF 
1
4Vf...

result:

ok 100000 test cases ok. (100000 test cases)

Test #6:

score: 0
Accepted
time: 59ms
memory: 50904kb

input:

10000
42
Bzs0PiQMXGZ5rRZ_2D G 2 accepted
9XtB_VIfbRRL E 11 accepted
FVJL M 13 rejected
a S 19 accepted
tsd Z 20 rejected
MyCqVEg1ONjZ U 22 accepted
6SgZMn N 51 rejected
Qua1Pti3vKhyQKDUm P 54 accepted
i29 M 63 accepted
zPqu D 68 rejected
xx2yiu6x C 71 rejected
fYuK1KNkuyO5HRCq L 76 rejected
tXWpYVqj...

output:

4
Qua1Pti3vKhyQKDUm fYuK1KNkuyO5HRCq xiLm0TUOF3T tsd 
2
t3 JP 
2
fhYPGC8W82NwJTQL 77sgqpbTIr_Zt1 
2
pVWDEz 3BQ 
2
tg buCeoOotAkV8DaFD6 
1
UkXQ3iaNJ 
2
vwfw ALTqPt7JUSLrl 
1
QTEzV6tp 
3
9cy_y_RNRwex8j7224hz wJlbqIU 4e1l0pO8eFjZwkDo 
2
eiuF7a_ 6mbCu5zA 
1
xy6QBr8ECi 
3
ldaKLZb1oS1sS PezeyUurYoz7N1iGU ...

result:

ok 10000 test cases ok. (10000 test cases)

Test #7:

score: 0
Accepted
time: 71ms
memory: 52096kb

input:

10000
27
bhAGFVDBjp4_Tvo U 24 accepted
bhAGFVDBjp4_Tvo O 37 rejected
bhAGFVDBjp4_Tvo D 40 accepted
bhAGFVDBjp4_Tvo H 45 accepted
bhAGFVDBjp4_Tvo B 60 rejected
bhAGFVDBjp4_Tvo J 63 accepted
bhAGFVDBjp4_Tvo M 81 rejected
bhAGFVDBjp4_Tvo M 98 rejected
bhAGFVDBjp4_Tvo D 103 rejected
bhAGFVDBjp4_Tvo Q 11...

output:

1
bhAGFVDBjp4_Tvo 
2
euenQ rl 
1
seny 
2
nLWe5xvBqfYkN 8zfFqdixKjh 
1
VDeEtfbb 
1
9PAd7wtbCZMws6u 
1
Wsfc5qold4uacAjI1y 
2
h68cyLwQ7drM__pSJub NX6GLK3Nz 
3
U7S8zgJhR6 sdf0IGct21OeEFJ yOgwg 
1
acesvM9yT 
1
2hQb 
2
P5 3twK2MJI_ 
1
eGCz 
3
tLHWIEVr5i7vlKpvlP UXRu8i 39GgHUPovILESCd0 
1
20gsbZ25SsYp8 
1
...

result:

ok 10000 test cases ok. (10000 test cases)

Test #8:

score: 0
Accepted
time: 81ms
memory: 52136kb

input:

10000
2
vVflLovvnhJEO U 3 accepted
Fg P 48 rejected
12
V9UJ5hEaWiwMq3lxwKw9 P 30 accepted
CKsw M 34 rejected
dCZBzKMxgQfgBDZO R 50 rejected
A1R2kF N 54 rejected
A1R2kF X 65 accepted
HEih51ut H 68 rejected
HEih51ut J 75 rejected
l0MCFXNXlH6T2wT I 163 accepted
A1R2kF B 180 accepted
dCZBzKMxgQfgBDZO A ...

output:

1
vVflLovvnhJEO 
2
A1R2kF V9UJ5hEaWiwMq3lxwKw9 
4
xgdxQ7t 5sFcoMh 2 fLUS3NYE 
2
2ra47EFC7LWzxTF2tSH S25TIbMLU5FMV6ys4 
2
tczurXngUW uwm 
3
gWG1aLfP1Gk DNAv Zh4tWi1QdYjTblw5 
1
qN_OnmRhGksD 
1
pAJC7fTKPJjaxPP 
2
Jr9Sqekor mElj5iV4wfu 
1
_Z13N_OO 
1
rn 
1
HhjFL6Rg 
1
2q 
5
eO6B_fLKDAZoY vdFavgJoOBT4vr...

result:

ok 10000 test cases ok. (10000 test cases)

Test #9:

score: 0
Accepted
time: 81ms
memory: 51656kb

input:

10000
4
BUqwUvN2v7co K 45 accepted
fb4ykhGx9CBzWxLcGYjf F 96 rejected
3X39YaWp0LItH14Owx R 142 rejected
7JGP4qtBonRiKpsKW U 155 rejected
3
Z0cxqdpQ69NGV5wDoht X 92 rejected
1E0aicZDqPhh E 105 accepted
a3fvTkSrKXqQipNGs4h K 261 rejected
6
LR6PY6OjDoSaZpT W 33 accepted
Et8w1E52xfM27 Q 155 accepted
LR6...

output:

1
BUqwUvN2v7co 
2
1E0aicZDqPhh Z0cxqdpQ69NGV5wDoht 
1
LR6PY6OjDoSaZpT 
3
b YX 7f 
4
WqSH sgpEsfgf_Fd o7VPp buFAkOkQ_F 
1
coTjuCSsnonAgjYkChE 
2
clGo2Z4AMe9Qp GC0Lw1Di 
2
IrJ_n_Ym FCCHBTUTGJTbTjEb 
1
fkBpEQxhBl21ARSTVR 
1
fQzlJS9JEIS97gIIG7p4 
6
CVVvEx otcG2t pqyDmprb2RmUBafc76eR ljfPMl71hE togGKu7uZ...

result:

ok 10000 test cases ok. (10000 test cases)

Test #10:

score: 0
Accepted
time: 72ms
memory: 51616kb

input:

10000
7
dBv7DiT L 42 rejected
dBv7DiT P 123 accepted
7Bj2dZF6Gy7csrXYakI T 131 rejected
9KtuO O 190 accepted
BxACEk Q 285 rejected
BxACEk Q 291 rejected
HK0pq9qsGnlkgAQT L 296 accepted
3
NQgnW3CShrFJYkKdjagN G 53 rejected
ZwZCr O 261 accepted
ZwZCr P 270 accepted
6
mbGQ7wcZYr9leKBCsFN Z 4 rejected
7...

output:

2
dBv7DiT 9KtuO 
1
ZwZCr 
2
7s1bgtS 4LUVnW93OFHOl6fJOmXK 
4
_g2LouxyEI_BXaOYQWn CZNz6k1QgLrHojbY upCvWQnHRgRSQQ pz 
3
t ungF4dKzJt290JMWNgeH q 
3
4FjAuM44Nzaz6Tc0 6mCVqSBpHVkrNZ SuBp7xLMGCHgk 
1
xXqqS7r1OU 
1
YEHiJvhHR8OmUWz 
3
m 0WZFvefoPtNo BiasA1Md2ViU 
1
MzQD 
2
MJJ4n2rC7YHRflGzEL L501za_ktc 
1
...

result:

ok 10000 test cases ok. (10000 test cases)

Test #11:

score: 0
Accepted
time: 16ms
memory: 55104kb

input:

7
110
10 A 0 accepted
0 A 100 accepted
1 A 100 accepted
2 A 100 accepted
3 A 100 accepted
4 A 100 accepted
5 A 100 accepted
6 A 100 accepted
7 A 100 accepted
8 A 100 accepted
9 A 100 accepted
0 B 100 accepted
1 B 100 accepted
2 B 100 accepted
3 B 100 accepted
4 B 100 accepted
5 B 100 accepted
6 B 10...

output:

11
0 1 2 3 4 5 6 7 8 9 10 
11
0 1 2 3 4 5 6 7 8 9 10 
11
0 1 2 3 4 5 6 7 8 9 10 
11
0 1 2 3 4 5 6 7 8 9 100 
12
0 1 2 3 4 5 6 7 8 9 10 100 
36
27 19 20 21 22 23 24 25 26 1 28 29 30 31 32 33 34 0 17 18 2 3 4 5 6 7 8 10 11 12 13 14 15 16 9 35 
35
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21...

result:

ok 7 test cases ok. (7 test cases)

Test #12:

score: 0
Accepted
time: 99ms
memory: 52000kb

input:

1000
58
8VR4968BiWGrjt0 G 1 accepted
KfduBOJVYor3ixLgzUo Y 5 accepted
r9l9P_xyc7oagiZS0ZJ G 26 accepted
PL3OrMzXRJRVskByRHHl Y 38 accepted
7wL2M4T1PWyv9rJSdzGN N 47 rejected
Vu56KH6ZGwSm E 48 rejected
8VR4968BiWGrjt0 D 53 accepted
SI7h8yP C 57 rejected
aSVEsYSH9PJjsjSAyH N 61 accepted
D3UrdM8xI S 71...

output:

5
8VR4968BiWGrjt0 PL3OrMzXRJRVskByRHHl umqh9D mn0iyGyqWOakTAs1Qw SI7h8yP 
6
9M f22a5ba_ze2qsm2_2k 3A4BJULiR9S uxPAbOmdBcWg64Q52 EYdAeGI 6OSsIJ 
25
huLWXo JjWIyr8 DIt wd5q6DH 6zU XJ9p0AKseAnbt7vmR_ lUs4Rd_AXJR2FP48 qF0kRrasPk V 9DVkaj8vMDxLV4MVh2O_ wjew0c2d FJhecJwM m4fNASlCh u nl0QcKuac D6SdnJFh6xFQ...

result:

ok 1000 test cases ok. (1000 test cases)

Test #13:

score: 0
Accepted
time: 130ms
memory: 53956kb

input:

100
974
qG R 0 accepted
k2K I 0 accepted
NelrCjQd_AHSw107 D 1 accepted
ybeH_JvdmCLMOGl9x K 1 accepted
h3 Q 2 accepted
9qOW O 2 accepted
v1IWHoW7Mkuce6qH Y 2 accepted
mlypVkK5Xl1KXw3o P 2 rejected
zs X 3 accepted
1Fpyq8oUYV_aNp I 3 rejected
e1bM8xUh E 3 rejected
myaSH0LCL4hD5BlAj F 4 rejected
IJETUS2...

output:

65
v8ok8uFd3 PGbK jpgL7AOwwgwK4fC Io5tMwXAJlbYL2Wikqqq ph3vkoSPOLM9EarA 2cBZ QXFitGeaPT8BjI T0nxKkJV ybeH_JvdmCLMOGl9x ZSGN5hzdkSTUHpfNk03 185RryPWmjK2h47NJax 1qXXQyXNhDyf97IT0n JSC6wpny7viIbAUq qG lQdXyR QGg o_d5R9oBv dHvWryQd8SGEch mBzwDDISUnGJ03 55IlpzN jp0GVUcZUKvitpzn9 3f3gDxR FJ9Y jjlJFal1mKsc...

result:

ok 100 test cases ok. (100 test cases)

Test #14:

score: 0
Accepted
time: 224ms
memory: 66696kb

input:

10
5371
r0JLpp2hFx T 0 accepted
w19l89 X 0 rejected
PeEB Y 0 accepted
2MwVQe3 Y 0 accepted
CarjodD8k4E K 0 accepted
vNjq0LmY D 0 accepted
Bvi16IvVACG3uREuoO X 0 accepted
yMlDlaWPTluR1dk43nl6 A 0 rejected
4LBA3qILgaib4lrQ X 1 accepted
vRSpyKVAU7e I 1 rejected
627aFcGG4zh8 Z 1 rejected
FHwI U 1 accept...

output:

85
FHwI us0nX6O Yg2 rYdosBQym DdOUBy W5kPWYzB Lhpil n5 CgcD1 Du2Rmmj_rlgveV I9Tfaeo6lTwLkgC90n vTtpWBju RYY7Oy5Ma3N_Q 3ntTBJ2G Tsv4prgzdtzBRbKoQO 7R iTzYUh2 FlTsTqSJ TiH aXGT Ok 9Saa 2AF3LbCAMXg vjtxbRlXkOLT fW_i UhNeNpTgJpuTp4im m8egNT9AnqXg IxS gSEQxgTIy WiikFMuk_mwuntjRW9 DoLs mbbtuMJM9C TwJGX0B5...

result:

ok 10 test cases ok. (10 test cases)

Test #15:

score: 0
Accepted
time: 563ms
memory: 132928kb

input:

1
100000
OZeDY6m2v P 0 accepted
DolcP A 0 accepted
2Z9Yd M 0 rejected
Vjl F 0 accepted
SPetC8_ru4S3nXJkkD C 0 rejected
XhLC G 0 rejected
wZvhcns7t7EaOero E 0 accepted
HRqRKcO87 I 0 rejected
dwfT7D H 0 rejected
cxvYaN8zSMGpoa9Q9xv U 0 accepted
nvXlrCa1zbx8uokfd T 0 accepted
E_bbU5C9bgpD_wGo P 0 rejec...

output:

213
WkhL56sCNA 0hH td2QZhNj3_yuVDIRv AFI6LHRQdFZsGz C43v3R4b8LW3Q9 JywY2nxqp7vDlS7acVp H0k8x8atYKY_21zGSH XCr3cyEYfUobJWWeq4Jf XpmVdJL e3j8zVv4RVEyu ijs5Fqs3HFNSIeg AUy _awjT fWb7IydN_gKzO2taC E0ujOKr8 Bd mA38ho AzFHajD2avcSUKFa _gYXF gSr1b944aMPbrjagCZO XU8Ig 7DqC__BGQC70H0v Bv2Zg6BW2i8glnP kQwNZqy...

result:

ok 1 test cases ok. (1 test case)

Test #16:

score: 0
Accepted
time: 31ms
memory: 52264kb

input:

1
100000
A A 0 accepted
B Z 299 accepted
B Z 299 accepted
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A 299 rejected
B A ...

output:

1
B 

result:

ok 1 test cases ok. (1 test case)

Test #17:

score: 0
Accepted
time: 771ms
memory: 180180kb

input:

1
100000
qyGXWlwMuXY3212 A 20 accepted
l_IeEuuLy9 A 20 accepted
nlyFO0YOiDxyiNjBb A 20 accepted
8H A 20 accepted
ek A 20 accepted
Em63tewQVLljOUO4r A 20 accepted
AHdtZtwK8debApdvxMy8 A 20 accepted
l3aTB A 20 accepted
vyFuSSSLTV5yP A 20 accepted
uzPnnAXshwHCbl7 A 20 accepted
sL A 20 accepted
K099qoYV...

output:

99965
TzIt8tE CibPaV auvRJfUAJTND9dU Pr0qOV0te 6fveIowM2 L30L5Irm9yGWHk98vI OgIoQFsuO3bX DqNA 1fsRDMoirneOPAlBYasR I9pQ2_iWQ7a 94 V XVtjvOd8gkPOH vV5RssHVQgZRkGf0 Cp zw MpzRY u_ g8M8urNPRWM G3 0e pfLbJy kcOyj1cyZOWH_GUabu A9HXLs_O2esOqFG cbDeMjxCq7GFy iyb7xj36qb8uJxcNEsd l9twqnaxXtKPhQEjaa1 _2O0I9Qv...

result:

ok 1 test cases ok. (1 test case)

Test #18:

score: 0
Accepted
time: 782ms
memory: 180452kb

input:

1
100000
xhmAFe A 20 accepted
loPCkhj2qt A 20 accepted
WIx A 20 accepted
T3zIPb A 20 accepted
xEEBg A 20 accepted
Gd0_zLXNJ1l1_Zrqa2 A 20 accepted
cM68n01suqhgjrBA A 20 accepted
LA6 A 20 accepted
AXBqy A 20 accepted
VLc4yxmdrN7S A 20 accepted
6p_z1vz2 A 20 accepted
wujWaUQNU0 A 20 accepted
eHIPyc0l3...

output:

99965
QAU0u 53XZTwZI3oDwi 0z_ja Yuli e8X0M dreyjmL iTNJ5n3CsQHY198Z krsa5w868pqT4U4C2Qs j_aZ5RR_ 6gQ0m_F1cdPYazO1G RR8EmArgx4irl WHex luNs26eJk CJSvvD0EfBu3layGkki 2oQCy_uTDZScBPKP9x JIj_KsjYaYX7F EKkuqb0 2IvvRv8Z140f7BcY YUm8eDkmZ4Tx 67aVrcyB7Q 8vQTtX3Cd DY272sC17b 2c9oYWppzlt bkaZ58YDziupZNgG YFms...

result:

ok 1 test cases ok. (1 test case)

Extra Test:

score: 0
Extra Test Passed