QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#306012#74. Algorithm TeachingqiuzxTL 875ms59544kbC++172.6kb2024-01-16 08:56:102024-01-16 08:56:11

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 10084kb

input:

1
3 DFS BFS DIJKSTRA

output:

3

result:

ok single line: '3'

Test #2:

score: 0
Accepted
time: 18ms
memory: 9860kb

input:

100
3 BFS DFS DP
3 BFS DFS DIJKSTRA
3 BFS DFS MAXFLOW
3 BFS DFS GREEDY
3 BFS DFS LCA
3 BFS DP DIJKSTRA
3 BFS DP MAXFLOW
3 BFS DP GREEDY
3 BFS DP LCA
3 BFS DIJKSTRA MAXFLOW
3 BFS DIJKSTRA GREEDY
3 BFS DIJKSTRA LCA
3 BFS MAXFLOW GREEDY
3 BFS MAXFLOW LCA
3 BFS GREEDY LCA
3 DFS DP DIJKSTRA
3 DFS DP MAXF...

output:

35

result:

ok single line: '35'

Test #3:

score: 0
Accepted
time: 3ms
memory: 10124kb

input:

16
1 BFS
1 DFS
1 DP
1 DIJKSTRA
1 MAXFLOW
1 GREEDY
4 BFS DIJKSTRA GREEDY DFS
3 DIJKSTRA GREEDY MAXFLOW
4 GREEDY DIJKSTRA DFS MAXFLOW
2 BFS DFS
3 GREEDY DFS BFS
4 MAXFLOW GREEDY DP DIJKSTRA
4 BFS DIJKSTRA MAXFLOW DP
2 GREEDY MAXFLOW
5 GREEDY DP MAXFLOW DFS BFS
6 MAXFLOW DFS GREEDY DP DIJKSTRA BFS

output:

20

result:

ok single line: '20'

Test #4:

score: 0
Accepted
time: 3ms
memory: 8848kb

input:

25
2 BFS DFS
2 BFS DP
2 BFS DIJKSTRA
2 BFS MAXFLOW
2 BFS GREEDY
2 DFS DP
2 DFS DIJKSTRA
2 DFS MAXFLOW
2 DFS GREEDY
2 DP DIJKSTRA
2 DP MAXFLOW
2 DP GREEDY
2 DIJKSTRA MAXFLOW
2 DIJKSTRA GREEDY
2 MAXFLOW GREEDY
5 DFS MAXFLOW GREEDY DP DIJKSTRA
2 DFS GREEDY
5 DIJKSTRA DFS MAXFLOW BFS DP
5 DP DFS DIJKSTR...

output:

20

result:

ok single line: '20'

Test #5:

score: 0
Accepted
time: 3ms
memory: 8500kb

input:

30
3 BFS DFS DP
3 BFS DFS DIJKSTRA
3 BFS DFS MAXFLOW
3 BFS DFS GREEDY
3 BFS DP DIJKSTRA
3 BFS DP MAXFLOW
3 BFS DP GREEDY
3 BFS DIJKSTRA MAXFLOW
3 BFS DIJKSTRA GREEDY
3 BFS MAXFLOW GREEDY
3 DFS DP DIJKSTRA
3 DFS DP MAXFLOW
3 DFS DP GREEDY
3 DFS DIJKSTRA MAXFLOW
3 DFS DIJKSTRA GREEDY
3 DFS MAXFLOW GRE...

output:

20

result:

ok single line: '20'

Test #6:

score: 0
Accepted
time: 3ms
memory: 9232kb

input:

25
4 BFS DFS DP DIJKSTRA
4 BFS DFS DP MAXFLOW
4 BFS DFS DP GREEDY
4 BFS DFS DIJKSTRA MAXFLOW
4 BFS DFS DIJKSTRA GREEDY
4 BFS DFS MAXFLOW GREEDY
4 BFS DP DIJKSTRA MAXFLOW
4 BFS DP DIJKSTRA GREEDY
4 BFS DP MAXFLOW GREEDY
4 BFS DIJKSTRA MAXFLOW GREEDY
4 DFS DP DIJKSTRA MAXFLOW
4 DFS DP DIJKSTRA GREEDY
...

output:

20

result:

ok single line: '20'

Test #7:

score: 0
Accepted
time: 3ms
memory: 10272kb

input:

16
5 BFS DFS DP DIJKSTRA MAXFLOW
5 BFS DFS DP DIJKSTRA GREEDY
5 BFS DFS DP MAXFLOW GREEDY
5 BFS DFS DIJKSTRA MAXFLOW GREEDY
5 BFS DP DIJKSTRA MAXFLOW GREEDY
5 DFS DP DIJKSTRA MAXFLOW GREEDY
3 BFS DIJKSTRA MAXFLOW
4 MAXFLOW DFS DP GREEDY
2 DIJKSTRA BFS
4 DIJKSTRA GREEDY MAXFLOW BFS
6 DIJKSTRA BFS DP ...

output:

20

result:

ok single line: '20'

Test #8:

score: 0
Accepted
time: 3ms
memory: 9164kb

input:

11
6 BFS DFS DP DIJKSTRA MAXFLOW GREEDY
1 DFS
6 BFS DIJKSTRA MAXFLOW DFS GREEDY DP
2 BFS DP
2 GREEDY DP
5 GREEDY MAXFLOW DP BFS DIJKSTRA
2 DFS GREEDY
2 MAXFLOW GREEDY
5 DFS DP BFS MAXFLOW DIJKSTRA
2 GREEDY DIJKSTRA
3 BFS MAXFLOW DP

output:

20

result:

ok single line: '20'

Test #9:

score: 0
Accepted
time: 3ms
memory: 9596kb

input:

87
3 BFS DFS DP
3 BFS DFS DIJKSTRA
3 BFS DFS MAXFLOW
3 BFS DFS GREEDY
3 BFS DFS LCA
3 BFS DFS RMQ
3 BFS DFS GEOMETRY
3 BFS DP DIJKSTRA
3 BFS DP MAXFLOW
3 BFS DP GREEDY
3 BFS DP LCA
3 BFS DP RMQ
3 BFS DP GEOMETRY
3 BFS DIJKSTRA MAXFLOW
3 BFS DIJKSTRA GREEDY
3 BFS DIJKSTRA LCA
3 BFS DIJKSTRA RMQ
3 BFS...

output:

84

result:

ok single line: '84'

Test #10:

score: 0
Accepted
time: 2ms
memory: 8476kb

input:

1
4 DFS MAXFLOW DP DIJKSTRA

output:

6

result:

ok single line: '6'

Test #11:

score: 0
Accepted
time: 41ms
memory: 10444kb

input:

2
10 MAXFLOW BFS DP DFS GEOMETRY GREEDY RMQ LCA UNIONFIND DIJKSTRA
2 MAXFLOW DIJKSTRA

output:

252

result:

ok single line: '252'

Test #12:

score: 0
Accepted
time: 0ms
memory: 9348kb

input:

2
4 BFS DFS LCA RMQ
2 PRIM KRUSKAL

output:

8

result:

ok single line: '8'

Test #13:

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

input:

10
9 GEOMETRY DIJKSTRA DFS MAXFLOW GREEDY RMQ DP UNIONFIND LCA
10 RMQ DFS DP BFS LCA MAXFLOW UNIONFIND GREEDY GEOMETRY DIJKSTRA
3 BFS DP MAXFLOW
8 RMQ BFS GREEDY UNIONFIND MAXFLOW GEOMETRY DP LCA
9 BFS MAXFLOW DIJKSTRA GEOMETRY DFS LCA GREEDY UNIONFIND RMQ
7 BFS LCA GEOMETRY RMQ MAXFLOW UNIONFIND DF...

output:

252

result:

ok single line: '252'

Test #14:

score: 0
Accepted
time: 875ms
memory: 59544kb

input:

100
3 LCA BFS UNIONFIND
7 MAXFLOW DP RMQ DFS GEOMETRY LCA UNIONFIND
2 MAXFLOW UNIONFIND
9 GREEDY BFS UNIONFIND DIJKSTRA MAXFLOW LCA GEOMETRY DFS DP
3 DFS DP GEOMETRY
8 DP GEOMETRY DIJKSTRA RMQ BFS GREEDY DFS MAXFLOW
9 DIJKSTRA UNIONFIND DP GREEDY BFS DFS RMQ LCA GEOMETRY
8 LCA UNIONFIND DP DFS BFS R...

output:

252

result:

ok single line: '252'

Test #15:

score: 0
Accepted
time: 482ms
memory: 37288kb

input:

100
3 BQNKJPCAZI GHIDPTMSQK KTAQLPAKRK
2 MRWDUJEFEE JUJTAGRGSE
8 JAHPUIJYKH JFZCKMHFSV LLZQZWFTJJ WXCCNXDFUV ZKQNLPIDMY ATPTFBIVWL OLPMASMESX HXWMLFIEMA
7 EWZOANDAGA PDHYOTVCZB ZKDPOYYSSX ZOQMMIFLAZ DVPXQXYVDC SWJAVNZYCD HKGTIGYTGS
2 XRRBOMNOVS JMUWWORGUJ
3 ERUGELHBUJ SEPBQCUGJT SLKQIHPIQW
10 GDZNRS...

output:

4505

result:

ok single line: '4505'

Test #16:

score: 0
Accepted
time: 604ms
memory: 44044kb

input:

100
5 TVFEDEMLND RWAAAYHZRV IEVPVTXVLP LHQZKZJVHC JXYHNKBLKU
7 ILOWLRUWZD IJNUAGUKNR GDTCWTFRJN RJVSXORIOP NKCLIPSPMC AINLBPWNJR IYWXDXREVP
3 FJIDJFQBUH LQGKTYKPAY JYWROWHIKO
3 RMQ QDVHEXMUVT LNFHXRLEQL
6 ZPPVJFVSGH IQWZKGOTXK ZBHZOIATVX ECVWODTSWB JECLCKKKFS ZTTISJSJCG
5 LDCPDNQMMR RLHSHFKGCO ITOWL...

output:

4864

result:

ok single line: '4864'

Test #17:

score: -100
Time Limit Exceeded

input:

100
8 ILRAZVXODW GREEDY EPVLXJGRZP RMQ DFS UNIONFIND MCLZBHDTFP DP
9 LZCXQJMTDW DP TGTNLSIJOW ILRAZVXODW EPVLXJGRZP BFS GEOMETRY DFS MAXFLOW
9 FGRSZCKMJJ GREEDY TGTNLSIJOW FYACVCHOEU UNIONFIND MCLZBHDTFP BFS LZCXQJMTDW DFS
9 FYACVCHOEU BFS UNIONFIND IMPBXYLFQN PTDPYKQWER DFS DIJKSTRA ILRAZVXODW HQEN...

output:


result: