QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#323285#6382. LaLa and Spirit Summoningucup-team2208WA 0ms4140kbC++204.9kb2024-02-09 06:17:322024-02-09 06:17:33

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3 3
0 1 0
0 2 0
1 2 0

output:

5

result:

ok 1 number(s): "5"

Test #2:

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

input:

3 3
0 1 0
0 2 1
1 2 2

output:

3

result:

ok 1 number(s): "3"

Test #3:

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

input:

4 4
0 1 0
1 2 1
2 3 2
0 3 3

output:

4

result:

ok 1 number(s): "4"

Test #4:

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

input:

5 4
0 1 0
1 2 1
2 3 2
3 4 3

output:

6

result:

ok 1 number(s): "6"

Test #5:

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

input:

2 0

output:

4

result:

ok 1 number(s): "4"

Test #6:

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

input:

2 1
0 1 0

output:

3

result:

ok 1 number(s): "3"

Test #7:

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

input:

2 2
0 1 0
0 1 1

output:

3

result:

ok 1 number(s): "3"

Test #8:

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

input:

2 3
0 1 0
0 1 2
0 1 0

output:

3

result:

ok 1 number(s): "3"

Test #9:

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

input:

2 4
0 1 2
0 1 3
0 1 2
0 1 3

output:

3

result:

ok 1 number(s): "3"

Test #10:

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

input:

2 5
0 1 2
0 1 4
0 1 3
0 1 4
0 1 3

output:

3

result:

ok 1 number(s): "3"

Test #11:

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

input:

2 6
0 1 3
0 1 3
0 1 1
0 1 0
0 1 3
0 1 4

output:

3

result:

ok 1 number(s): "3"

Test #12:

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

input:

2 7
0 1 1
0 1 5
0 1 6
0 1 4
0 1 1
0 1 2
0 1 3

output:

3

result:

ok 1 number(s): "3"

Test #13:

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

input:

2 8
0 1 2
0 1 5
0 1 1
0 1 4
0 1 2
0 1 1
0 1 1
0 1 1

output:

3

result:

ok 1 number(s): "3"

Test #14:

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

input:

2 9
0 1 8
0 1 7
0 1 0
0 1 7
0 1 4
0 1 1
0 1 2
0 1 8
0 1 5

output:

3

result:

ok 1 number(s): "3"

Test #15:

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

input:

2 10
0 1 0
0 1 7
0 1 8
0 1 5
0 1 8
0 1 7
0 1 8
0 1 3
0 1 4
0 1 3

output:

3

result:

ok 1 number(s): "3"

Test #16:

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

input:

3 0

output:

6

result:

ok 1 number(s): "6"

Test #17:

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

input:

3 1
1 2 0

output:

5

result:

ok 1 number(s): "5"

Test #18:

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

input:

3 2
1 2 1
1 2 1

output:

5

result:

ok 1 number(s): "5"

Test #19:

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

input:

3 3
1 2 2
1 2 1
0 1 1

output:

4

result:

ok 1 number(s): "4"

Test #20:

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

input:

3 4
1 2 3
0 2 1
1 2 0
1 2 3

output:

4

result:

ok 1 number(s): "4"

Test #21:

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

input:

3 5
1 2 0
1 2 2
0 1 4
0 2 0
0 1 0

output:

3

result:

ok 1 number(s): "3"

Test #22:

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

input:

3 6
1 2 4
0 1 1
0 2 5
1 2 1
0 2 3
0 1 4

output:

3

result:

ok 1 number(s): "3"

Test #23:

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

input:

3 7
1 2 6
1 2 2
1 2 4
1 2 6
1 2 1
0 2 2
0 1 6

output:

3

result:

ok 1 number(s): "3"

Test #24:

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

input:

3 8
1 2 6
0 1 2
0 1 4
0 2 3
1 2 1
1 2 0
0 2 4
1 2 4

output:

3

result:

ok 1 number(s): "3"

Test #25:

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

input:

3 9
1 2 8
1 2 4
1 2 4
1 2 8
1 2 8
1 2 4
1 2 7
0 1 3
0 2 2

output:

3

result:

ok 1 number(s): "3"

Test #26:

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

input:

3 10
0 1 9
0 2 4
0 1 0
0 1 9
1 2 4
0 1 9
1 2 9
1 2 5
1 2 5
0 1 0

output:

3

result:

ok 1 number(s): "3"

Test #27:

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

input:

4 0

output:

8

result:

ok 1 number(s): "8"

Test #28:

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

input:

4 1
1 3 0

output:

7

result:

ok 1 number(s): "7"

Test #29:

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

input:

4 2
0 1 0
1 2 0

output:

7

result:

ok 1 number(s): "7"

Test #30:

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

input:

4 3
0 3 0
2 3 1
0 3 1

output:

6

result:

ok 1 number(s): "6"

Test #31:

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

input:

4 4
2 3 1
2 3 0
0 2 2
0 1 2

output:

6

result:

ok 1 number(s): "6"

Test #32:

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

input:

4 5
2 3 1
0 1 2
1 3 3
0 3 2
2 3 3

output:

5

result:

ok 1 number(s): "5"

Test #33:

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

input:

4 6
1 3 1
0 2 5
0 3 0
0 2 3
1 3 2
0 3 4

output:

5

result:

ok 1 number(s): "5"

Test #34:

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

input:

4 7
1 2 4
0 3 4
0 2 1
2 3 4
0 2 0
0 1 1
1 3 3

output:

4

result:

ok 1 number(s): "4"

Test #35:

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

input:

4 8
0 2 1
0 3 7
1 3 7
2 3 3
1 2 0
2 3 7
1 2 0
2 3 0

output:

4

result:

ok 1 number(s): "4"

Test #36:

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

input:

4 9
0 2 5
0 3 0
1 2 5
0 2 1
2 3 1
1 3 7
1 3 2
2 3 5
0 2 8

output:

3

result:

ok 1 number(s): "3"

Test #37:

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

input:

4 10
1 2 0
0 2 0
2 3 0
0 1 1
2 3 8
1 2 2
0 3 9
1 3 6
1 2 6
1 2 4

output:

3

result:

ok 1 number(s): "3"

Test #38:

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

input:

5 0

output:

10

result:

ok 1 number(s): "10"

Test #39:

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

input:

5 1
0 4 0

output:

9

result:

ok 1 number(s): "9"

Test #40:

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

input:

5 2
0 3 0
0 3 1

output:

9

result:

ok 1 number(s): "9"

Test #41:

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

input:

5 3
0 2 0
1 4 2
1 2 2

output:

8

result:

ok 1 number(s): "8"

Test #42:

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

input:

5 4
0 1 3
3 4 2
3 4 3
2 3 2

output:

8

result:

ok 1 number(s): "8"

Test #43:

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

input:

5 5
0 3 4
1 2 3
2 4 0
0 4 4
1 4 3

output:

7

result:

ok 1 number(s): "7"

Test #44:

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

input:

5 6
0 2 2
3 4 5
0 3 4
1 2 5
1 2 1
3 4 4

output:

6

result:

ok 1 number(s): "6"

Test #45:

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

input:

5 7
0 1 0
0 2 6
3 4 3
3 4 0
0 2 6
3 4 6
3 4 4

output:

7

result:

ok 1 number(s): "7"

Test #46:

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

input:

5 8
0 4 5
2 4 4
1 2 3
1 4 2
0 3 7
2 3 6
3 4 3
3 4 4

output:

4

result:

ok 1 number(s): "4"

Test #47:

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

input:

5 9
0 2 5
0 2 4
0 2 8
2 4 3
0 1 3
2 4 3
2 3 8
0 3 8
3 4 4

output:

6

result:

ok 1 number(s): "6"

Test #48:

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

input:

5 10
0 2 9
3 4 7
0 3 9
0 2 3
2 4 4
3 4 3
2 3 1
0 1 9
3 4 9
2 3 8

output:

5

result:

ok 1 number(s): "5"

Test #49:

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

input:

6 0

output:

12

result:

ok 1 number(s): "12"

Test #50:

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

input:

6 1
2 4 0

output:

11

result:

ok 1 number(s): "11"

Test #51:

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

input:

6 2
1 4 1
0 4 0

output:

10

result:

ok 1 number(s): "10"

Test #52:

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

input:

6 3
1 3 1
1 4 2
0 2 0

output:

9

result:

ok 1 number(s): "9"

Test #53:

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

input:

6 4
0 3 1
4 5 1
3 5 1
2 5 2

output:

10

result:

ok 1 number(s): "10"

Test #54:

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

input:

6 5
0 1 4
0 4 1
3 4 4
1 5 0
3 5 0

output:

9

result:

ok 1 number(s): "9"

Test #55:

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

input:

6 6
4 5 5
2 3 4
3 5 4
1 3 0
4 5 0
1 3 4

output:

9

result:

ok 1 number(s): "9"

Test #56:

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

input:

6 7
4 5 5
3 5 3
1 2 1
2 5 2
1 5 5
3 4 4
1 3 1

output:

7

result:

ok 1 number(s): "7"

Test #57:

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

input:

6 8
3 5 0
4 5 1
2 5 6
1 5 2
3 5 6
0 3 4
4 5 7
0 3 7

output:

7

result:

ok 1 number(s): "7"

Test #58:

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

input:

6 9
3 4 3
2 5 1
2 3 3
3 4 4
0 3 5
2 3 7
0 5 2
0 5 3
1 3 1

output:

7

result:

ok 1 number(s): "7"

Test #59:

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

input:

6 10
0 3 8
3 4 4
2 5 1
4 5 4
3 5 8
0 5 4
2 3 0
0 1 0
3 4 0
0 2 2

output:

7

result:

ok 1 number(s): "7"

Test #60:

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

input:

7 0

output:

14

result:

ok 1 number(s): "14"

Test #61:

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

input:

7 1
0 5 0

output:

13

result:

ok 1 number(s): "13"

Test #62:

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

input:

7 2
2 6 0
5 6 0

output:

13

result:

ok 1 number(s): "13"

Test #63:

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

input:

7 3
5 6 1
0 6 0
2 4 0

output:

12

result:

ok 1 number(s): "12"

Test #64:

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

input:

7 4
1 6 2
2 5 3
0 3 3
3 4 2

output:

12

result:

ok 1 number(s): "12"

Test #65:

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

input:

7 5
4 6 0
5 6 1
1 3 3
3 6 0
2 6 2

output:

10

result:

ok 1 number(s): "10"

Test #66:

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

input:

7 6
0 1 5
0 5 4
5 6 3
1 3 2
3 6 5
1 4 4

output:

10

result:

ok 1 number(s): "10"

Test #67:

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

input:

7 7
3 4 1
3 5 6
5 6 3
2 3 5
5 6 4
0 1 2
5 6 2

output:

9

result:

ok 1 number(s): "9"

Test #68:

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

input:

7 8
5 6 3
4 6 6
3 4 1
0 2 1
1 6 5
5 6 3
5 6 2
5 6 3

output:

10

result:

ok 1 number(s): "10"

Test #69:

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

input:

7 9
2 5 3
1 6 5
1 6 4
0 3 6
2 3 7
4 5 1
5 6 8
5 6 5
5 6 7

output:

8

result:

ok 1 number(s): "8"

Test #70:

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

input:

7 10
4 6 6
4 5 1
1 4 0
4 6 6
4 5 1
4 6 7
3 5 2
5 6 1
0 4 4
2 3 9

output:

8

result:

ok 1 number(s): "8"

Test #71:

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

input:

8 0

output:

16

result:

ok 1 number(s): "16"

Test #72:

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

input:

8 1
0 3 0

output:

15

result:

ok 1 number(s): "15"

Test #73:

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

input:

8 2
0 6 1
5 7 1

output:

15

result:

ok 1 number(s): "15"

Test #74:

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

input:

8 3
1 6 1
0 3 2
0 2 2

output:

14

result:

ok 1 number(s): "14"

Test #75:

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

input:

8 4
1 5 0
5 7 2
2 7 1
3 4 1

output:

13

result:

ok 1 number(s): "13"

Test #76:

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

input:

8 5
2 6 3
1 5 1
6 7 0
6 7 2
4 5 4

output:

12

result:

ok 1 number(s): "12"

Test #77:

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

input:

8 6
2 6 2
6 7 2
2 5 3
3 5 4
0 3 4
0 1 0

output:

12

result:

ok 1 number(s): "12"

Test #78:

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

input:

8 7
3 5 6
2 4 3
4 7 0
5 6 1
3 4 5
6 7 0
5 6 6

output:

11

result:

ok 1 number(s): "11"

Test #79:

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

input:

8 8
3 4 7
0 7 3
1 6 5
3 7 1
5 7 4
0 7 2
3 7 6
0 4 6

output:

10

result:

ok 1 number(s): "10"

Test #80:

score: -100
Wrong Answer
time: 0ms
memory: 4140kb

input:

8 9
4 5 1
5 6 2
3 7 7
5 6 8
1 3 1
6 7 4
2 7 4
4 7 0
5 6 2

output:

10

result:

wrong answer 1st numbers differ - expected: '11', found: '10'