QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#77045#1188. Estimating the Flood RiskMinneapolisAC ✓1ms1884kbC++20922b2023-02-13 00:38:502023-02-13 00:38:54

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

5 4 2
1 1 10
5 4 3

output:

130

result:

ok "130"

Test #2:

score: 0
Accepted
time: 1ms
memory: 1696kb

input:

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

output:

-14

result:

ok "-14"

Test #3:

score: 0
Accepted
time: 1ms
memory: 1688kb

input:

3 3 2
1 1 8
3 3 3

output:

No

result:

ok "No"

Test #4:

score: 0
Accepted
time: 1ms
memory: 1748kb

input:

2 2 1
1 1 -100

output:

-404

result:

ok "-404"

Test #5:

score: 0
Accepted
time: 1ms
memory: 1748kb

input:

5 4 2
1 1 10
5 4 3

output:

130

result:

ok "130"

Test #6:

score: 0
Accepted
time: 1ms
memory: 1568kb

input:

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

output:

-14

result:

ok "-14"

Test #7:

score: 0
Accepted
time: 1ms
memory: 1436kb

input:

3 3 2
1 1 8
3 3 3

output:

No

result:

ok "No"

Test #8:

score: 0
Accepted
time: 1ms
memory: 1712kb

input:

3 3 2
1 1 3
3 3 8

output:

No

result:

ok "No"

Test #9:

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

input:

50 50 50
41 31 23
25 13 -7
9 13 -7
8 46 -14
5 38 -19
31 19 4
35 44 8
21 10 -6
16 26 -7
4 28 -14
33 29 13
2 14 -10
12 34 -9
21 48 -9
6 18 -14
27 28 6
13 7 -6
3 49 -7
14 24 -7
29 16 -1
8 19 -14
30 10 -3
30 15 -1
41 15 9
38 39 12
19 19 -3
4 18 -13
4 42 -14
49 27 15
31 34 10
19 10 -8
10 14 -8
42 43 15
4...

output:

-5997

result:

ok "-5997"

Test #10:

score: 0
Accepted
time: 1ms
memory: 1516kb

input:

50 50 50
21 18 36
39 34 64
29 6 27
26 42 65
8 37 60
26 25 48
22 20 39
21 16 35
48 25 59
1 41 66
34 38 56
36 12 39
3 47 72
6 28 55
42 4 42
46 11 44
9 20 46
5 7 39
50 45 68
32 41 60
1 32 60
25 41 63
1 29 58
16 44 59
40 5 39
29 38 59
43 46 71
49 49 69
25 11 34
4 23 53
38 35 63
1 43 68
28 39 60
1 34 61
...

output:

122275

result:

ok "122275"

Test #11:

score: 0
Accepted
time: 1ms
memory: 1504kb

input:

50 50 50
29 19 83
12 42 43
22 42 53
41 28 80
34 3 98
44 38 79
15 11 76
35 10 97
48 50 72
27 45 57
16 16 72
37 8 93
21 18 75
13 43 45
9 43 42
34 42 64
48 47 71
11 31 54
24 45 57
32 14 90
10 35 51
10 13 69
15 42 46
32 12 92
3 12 70
40 23 80
11 40 46
3 18 64
14 14 73
12 32 53
46 49 69
34 29 77
18 21 70...

output:

No

result:

ok "No"

Test #12:

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

input:

50 50 2
1 1 -100
50 50 -100

output:

-330850

result:

ok "-330850"

Test #13:

score: 0
Accepted
time: 1ms
memory: 1736kb

input:

50 50 5
1 1 100
1 50 100
50 1 100
50 50 100
25 25 100

output:

209600

result:

ok "209600"

Test #14:

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

input:

1 1 1
1 1 0

output:

0

result:

ok "0"

Test #15:

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

input:

50 50 1
1 1 -100

output:

-372500

result:

ok "-372500"

Test #16:

score: 0
Accepted
time: 1ms
memory: 1692kb

input:

50 50 2
49 1 -100
50 50 -100

output:

-340050

result:

ok "-340050"

Test #17:

score: 0
Accepted
time: 1ms
memory: 1876kb

input:

33 47 33
26 37 7
17 24 4
12 25 2
31 1 6
13 5 4
21 7 1
3 40 1
30 43 4
26 11 5
1 20 5
27 20 4
23 19 3
21 25 8
17 9 3
14 25 7
29 16 0
24 25 6
2 41 2
24 22 6
13 45 3
20 21 0
25 13 4
15 33 9
13 27 3
8 14 3
31 3 3
9 1 2
27 30 6
33 13 3
31 20 6
20 40 8
3 18 5
27 1 7

output:

No

result:

ok "No"

Test #18:

score: 0
Accepted
time: 1ms
memory: 1764kb

input:

4 12 23
1 12 2
4 7 5
2 9 9
4 2 7
1 2 3
3 7 8
3 4 6
1 4 3
3 12 5
3 1 2
3 10 0
1 6 6
1 9 2
2 1 4
3 6 7
1 8 7
1 7 8
3 9 7
4 8 3
4 4 9
4 11 7
3 5 4
2 8 6

output:

No

result:

ok "No"

Test #19:

score: 0
Accepted
time: 1ms
memory: 1748kb

input:

2 24 39
1 1 9
1 11 9
2 23 0
2 11 7
2 20 5
2 3 9
2 6 8
1 2 3
2 17 1
2 9 6
1 20 0
2 24 7
2 4 2
2 16 0
1 21 0
1 13 5
1 6 1
2 10 7
2 8 1
1 23 4
2 7 7
1 19 3
1 9 3
2 14 7
1 15 7
1 16 5
1 14 6
2 13 2
2 5 3
1 4 7
1 5 4
2 19 6
2 1 1
1 18 3
1 10 2
1 8 5
2 12 3
1 3 4
1 7 6

output:

No

result:

ok "No"

Test #20:

score: 0
Accepted
time: 1ms
memory: 1740kb

input:

42 20 35
24 4 9
37 16 2
17 19 5
36 1 2
2 7 3
11 18 9
41 5 9
4 2 5
2 10 9
18 14 0
12 16 9
32 2 4
41 9 3
30 7 7
7 3 4
40 15 5
17 8 2
6 3 7
7 18 4
17 6 7
23 16 5
42 20 6
41 16 2
4 1 7
24 17 1
3 1 5
28 15 1
2 17 8
33 7 1
1 15 3
29 8 8
40 1 3
4 7 2
18 4 2
27 10 2

output:

No

result:

ok "No"

Test #21:

score: 0
Accepted
time: 1ms
memory: 1752kb

input:

38 17 24
37 7 2
12 5 2
28 10 4
12 15 7
36 2 4
14 8 0
24 5 0
10 5 2
3 9 2
26 4 0
10 3 6
11 15 3
20 3 6
12 14 9
6 7 0
3 16 0
21 7 7
9 10 0
34 12 9
23 13 8
18 5 5
19 15 6
33 4 9
32 17 7

output:

No

result:

ok "No"

Test #22:

score: 0
Accepted
time: 1ms
memory: 1440kb

input:

44 28 38
6 10 4
20 23 2
26 2 2
41 9 8
42 23 3
23 17 2
32 11 0
27 19 7
8 25 1
32 7 9
11 27 4
25 9 8
42 6 0
44 26 7
32 25 3
26 10 3
24 7 4
15 10 2
6 22 3
34 27 5
13 7 3
29 25 1
21 14 6
4 5 4
23 2 9
38 11 0
4 8 1
19 7 0
21 3 8
16 12 3
8 20 0
38 16 6
25 26 5
28 4 9
20 25 6
25 28 6
41 14 4
21 21 6

output:

No

result:

ok "No"

Test #23:

score: 0
Accepted
time: 1ms
memory: 1500kb

input:

2 13 2
2 10 8
1 8 1

output:

No

result:

ok "No"

Test #24:

score: 0
Accepted
time: 1ms
memory: 1492kb

input:

11 44 35
5 27 2
10 11 6
3 36 4
7 27 9
9 40 4
5 26 1
11 43 0
1 35 0
8 11 7
11 15 3
5 34 8
10 42 4
2 26 2
8 7 6
4 20 4
3 13 4
6 7 8
8 33 9
1 41 7
10 38 4
8 27 2
2 28 8
6 19 7
5 8 4
8 38 3
3 24 6
2 44 3
9 37 0
10 12 7
9 9 3
4 39 4
3 5 5
8 29 7
5 43 3
8 9 8

output:

No

result:

ok "No"

Test #25:

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

input:

33 47 42
9 23 1
13 9 4
30 13 8
25 14 2
8 9 4
5 25 3
25 10 5
16 44 3
32 37 7
5 4 3
30 11 8
8 5 8
25 38 2
33 39 3
6 32 5
2 11 8
2 22 1
32 30 4
5 42 2
22 36 5
9 8 3
11 25 3
16 14 1
17 38 7
32 4 2
13 10 3
20 33 7
14 35 7
11 20 1
15 45 4
7 21 7
11 11 1
14 19 6
16 24 1
27 45 4
31 7 2
31 15 1
33 13 1
11 22...

output:

No

result:

ok "No"

Test #26:

score: 0
Accepted
time: 1ms
memory: 1592kb

input:

50 22 5
9 5 -89
46 17 -50
44 1 -62
21 19 -69
15 6 -87

output:

-82543

result:

ok "-82543"

Test #27:

score: 0
Accepted
time: 1ms
memory: 1736kb

input:

13 28 30
8 25 -21
6 9 -34
2 19 -30
7 14 -31
4 10 -35
1 19 -29
2 4 -40
3 19 -31
3 9 -35
10 5 -42
10 7 -40
3 26 -24
4 17 -32
9 4 -41
12 1 -43
1 4 -40
1 9 -36
4 3 -40
8 17 -29
11 28 -24
10 27 -24
10 3 -40
8 18 -28
3 14 -32
6 14 -30
10 14 -33
7 19 -27
9 17 -30
12 15 -30
11 13 -33

output:

-11905

result:

ok "-11905"

Test #28:

score: 0
Accepted
time: 1ms
memory: 1572kb

input:

1 35 7
1 35 -92
1 6 -98
1 17 -97
1 2 -96
1 3 -97
1 32 -92
1 24 -95

output:

-3407

result:

ok "-3407"

Test #29:

score: 0
Accepted
time: 1ms
memory: 1600kb

input:

44 39 44
2 2 92
18 18 96
18 8 88
4 36 89
5 13 99
11 38 83
40 29 78
19 26 92
41 29 79
16 28 94
42 34 79
1 2 91
43 26 75
34 6 79
7 3 88
12 31 87
29 27 84
37 33 76
24 15 88
11 24 91
43 34 80
25 8 84
42 29 78
20 2 82
20 5 83
31 29 85
7 21 89
32 28 84
25 14 90
37 38 71
31 2 80
19 13 91
7 26 85
35 31 80
5...

output:

143503

result:

ok "143503"

Test #30:

score: 0
Accepted
time: 1ms
memory: 1692kb

input:

24 47 18
10 14 -89
7 3 -80
9 25 -91
18 34 -78
19 23 -88
14 36 -78
8 2 -80
21 1 -94
10 12 -91
20 16 -81
7 30 -91
11 29 -88
16 39 -77
3 1 -80
7 14 -87
19 8 -88
3 14 -91
23 41 -78

output:

-99466

result:

ok "-99466"

Test #31:

score: 0
Accepted
time: 1ms
memory: 1696kb

input:

50 3 26
47 2 -19
28 2 -16
38 2 -11
46 1 -17
43 2 -15
21 1 -13
11 2 -22
50 3 -15
12 3 -20
23 2 -16
16 2 -19
43 1 -15
44 1 -16
3 1 -22
8 1 -26
27 2 -15
7 3 -25
11 3 -21
10 3 -22
28 3 -15
4 3 -22
2 2 -20
5 1 -23
41 2 -13
13 2 -20
8 3 -24

output:

-2684

result:

ok "-2684"

Test #32:

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

input:

35 50 13
19 30 83
18 41 87
12 16 64
15 19 70
18 39 89
27 43 85
9 18 66
24 42 83
13 41 82
5 23 69
16 18 70
1 12 58
16 17 69

output:

117982

result:

ok "117982"

Test #33:

score: 0
Accepted
time: 1ms
memory: 1692kb

input:

10 13 16
6 7 51
4 1 50
2 2 50
3 7 49
2 9 47
6 10 49
1 3 49
6 8 51
5 10 50
4 5 50
6 2 51
1 4 49
3 11 47
5 5 51
9 10 50
6 11 48

output:

6240

result:

ok "6240"

Test #34:

score: 0
Accepted
time: 1ms
memory: 1880kb

input:

49 3 26
16 1 32
11 2 36
27 3 40
1 3 39
46 2 46
2 2 41
5 2 42
8 3 39
34 2 34
41 2 41
47 1 47
48 2 47
42 1 42
29 1 38
14 1 34
38 1 39
3 3 40
8 1 39
35 1 36
22 2 38
48 1 46
3 2 41
34 1 35
23 1 36
47 3 48
17 3 35

output:

5636

result:

ok "5636"

Test #35:

score: 0
Accepted
time: 1ms
memory: 1500kb

input:

9 38 45
8 25 -46
1 29 -49
4 34 -45
1 12 -45
1 31 -49
1 4 -51
3 30 -46
2 11 -46
1 9 -46
8 26 -46
9 10 -54
8 15 -52
3 33 -46
7 11 -51
8 29 -45
7 28 -43
4 26 -46
6 15 -53
8 20 -51
7 12 -51
6 1 -51
5 14 -51
6 20 -51
7 23 -47
1 32 -48
6 14 -52
9 2 -52
2 26 -48
9 19 -50
8 14 -53
5 28 -45
9 13 -51
2 4 -52
...

output:

-16960

result:

ok "-16960"

Test #36:

score: 0
Accepted
time: 1ms
memory: 1744kb

input:

32 32 45
20 22 39
29 27 33
31 26 30
25 32 31
29 1 33
19 7 36
9 11 43
8 27 40
4 8 48
22 32 31
25 1 31
31 31 30
30 29 31
6 5 49
32 3 38
5 17 39
24 31 29
11 15 46
28 28 34
25 26 32
27 25 30
25 6 36
31 9 33
19 2 33
30 31 30
32 12 30
6 18 39
9 23 38
1 1 51
30 25 32
32 24 32
8 11 43
30 23 33
10 4 44
8 32 ...

output:

37420

result:

ok "37420"

Test #37:

score: 0
Accepted
time: 1ms
memory: 1880kb

input:

3 34 46
3 15 0
2 8 5
2 34 4
3 32 5
3 29 7
3 20 0
2 11 2
1 18 4
1 8 8
3 9 6
3 10 3
2 27 5
2 1 4
1 20 6
3 7 7
3 19 0
1 1 6
1 34 5
3 2 6
2 13 0
3 21 0
2 17 8
1 15 3
1 4 9
3 27 8
3 6 4
1 3 2
3 18 3
2 3 3
3 3 9
1 24 9
3 22 2
2 25 4
3 23 6
3 16 2
3 34 0
3 25 6
1 13 2
2 15 8
2 14 3
3 4 7
1 28 0
2 23 6
3 14...

output:

No

result:

ok "No"

Test #38:

score: 0
Accepted
time: 1ms
memory: 1712kb

input:

33 17 10
32 10 0
5 9 4
1 6 8
26 10 6
16 14 9
20 17 2
2 7 4
11 3 4
22 1 8
26 8 4

output:

No

result:

ok "No"

Test #39:

score: 0
Accepted
time: 1ms
memory: 1748kb

input:

9 19 11
1 16 0
4 3 4
8 4 1
5 10 3
7 18 5
9 15 3
2 18 0
4 6 6
7 8 7
1 8 4
5 6 2

output:

No

result:

ok "No"

Test #40:

score: 0
Accepted
time: 1ms
memory: 1728kb

input:

2 29 19
2 19 1
1 23 3
1 17 0
2 8 8
2 14 5
1 12 9
2 12 3
1 9 0
2 29 4
2 28 8
2 27 3
1 28 8
2 2 6
2 21 0
1 16 0
2 7 5
2 18 1
2 26 1
2 3 7

output:

No

result:

ok "No"

Test #41:

score: 0
Accepted
time: 1ms
memory: 1688kb

input:

11 38 3
8 29 3
10 7 1
7 26 7

output:

-1465

result:

ok "-1465"

Test #42:

score: 0
Accepted
time: 1ms
memory: 1744kb

input:

11 43 42
4 41 7
5 33 7
11 13 0
6 4 0
8 8 0
11 20 3
11 8 0
11 33 3
8 41 5
8 23 2
10 21 5
6 3 2
4 14 2
10 3 2
10 39 4
9 42 4
2 4 4
11 16 9
4 34 7
4 4 4
10 37 1
1 23 8
4 39 6
2 18 3
1 13 1
7 37 3
8 24 1
6 26 3
11 3 7
8 10 7
4 7 4
7 16 7
11 26 0
11 11 9
11 10 1
11 42 9
7 41 4
7 1 6
8 19 9
3 36 9
6 1 2
2...

output:

No

result:

ok "No"

Test #43:

score: 0
Accepted
time: 1ms
memory: 1736kb

input:

24 27 45
22 11 7
23 17 0
2 19 9
18 5 5
4 19 4
13 10 7
1 1 4
4 16 4
15 2 4
4 9 2
4 23 0
10 24 3
13 15 1
16 16 2
18 14 4
6 15 8
8 21 8
9 11 5
11 4 4
1 9 4
24 17 3
8 7 8
22 17 6
9 27 5
18 27 0
6 3 6
13 14 7
14 21 9
18 1 4
5 2 4
13 21 0
7 21 5
18 8 2
7 25 3
16 24 6
14 20 2
15 7 9
4 10 6
7 15 6
5 11 3
17...

output:

No

result:

ok "No"

Test #44:

score: 0
Accepted
time: 1ms
memory: 1696kb

input:

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

output:

No

result:

ok "No"

Test #45:

score: 0
Accepted
time: 1ms
memory: 1884kb

input:

13 14 30
12 2 9
11 3 9
1 14 2
8 9 6
12 4 7
8 4 3
5 9 7
7 10 4
8 8 6
11 8 0
5 6 2
6 2 8
3 3 9
13 8 9
10 8 5
2 7 6
3 1 2
12 13 9
5 12 9
8 3 9
10 7 6
4 14 5
13 14 0
5 8 1
11 6 6
10 5 4
10 12 7
2 14 7
8 13 7
2 6 4

output:

No

result:

ok "No"

Test #46:

score: 0
Accepted
time: 1ms
memory: 1592kb

input:

47 16 6
36 6 2
39 13 8
14 6 3
25 9 9
7 15 8
23 16 9

output:

181

result:

ok "181"

Test #47:

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

input:

34 2 17
19 2 -100
30 2 -95
20 1 -99
32 1 -95
6 2 -89
3 2 -86
31 2 -94
34 2 -93
11 2 -92
22 1 -99
18 1 -98
24 1 -99
10 1 -90
3 1 -85
8 1 -89
2 2 -85
1 1 -84

output:

-6403

result:

ok "-6403"

Test #48:

score: 0
Accepted
time: 1ms
memory: 1744kb

input:

37 8 17
13 7 4
28 6 15
2 3 1
32 1 15
10 7 7
29 8 13
15 8 1
8 5 3
17 7 3
11 5 5
24 6 11
20 6 7
27 7 13
11 6 6
10 8 6
33 5 15
4 4 4

output:

1780

result:

ok "1780"

Test #49:

score: 0
Accepted
time: 1ms
memory: 1548kb

input:

9 46 37
8 35 11
1 30 15
4 41 1
9 5 -7
2 10 3
1 42 3
4 39 3
8 21 5
3 3 0
5 10 2
3 4 -1
3 38 5
4 19 7
5 44 5
6 10 1
4 34 8
1 40 5
7 25 7
9 14 1
8 14 1
2 16 3
6 30 12
7 44 5
5 15 3
3 24 7
2 24 8
5 26 7
6 8 -1
2 40 4
7 23 5
4 36 6
3 15 5
4 1 -1
2 33 11
2 13 2
2 35 9
3 43 4

output:

1546

result:

ok "1546"

Test #50:

score: 0
Accepted
time: 1ms
memory: 1500kb

input:

16 26 31
1 7 29
14 12 11
12 15 16
6 12 19
3 4 25
12 24 25
13 17 17
15 20 19
13 18 18
2 23 32
2 14 23
2 2 25
2 13 22
4 15 23
1 25 32
2 5 26
11 21 23
7 12 18
12 8 17
12 14 15
1 12 24
7 8 22
5 18 25
8 24 28
14 8 15
3 22 31
14 17 16
16 18 16
9 10 18
6 7 24
15 18 17

output:

8697

result:

ok "8697"

Test #51:

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

input:

9 41 48
7 1 -93
8 23 -90
5 15 -94
8 24 -91
9 38 -76
5 4 -98
5 41 -71
3 10 -93
1 4 -96
6 13 -94
8 36 -79
1 6 -97
4 13 -92
1 18 -93
7 9 -94
9 16 -89
4 11 -93
7 36 -78
4 3 -97
8 6 -93
2 17 -94
3 4 -98
4 22 -89
8 38 -77
1 38 -76
1 16 -95
6 25 -88
3 36 -75
8 13 -93
8 34 -81
3 11 -92
3 35 -75
8 39 -76
7 2...

output:

-32414

result:

ok "-32414"

Test #52:

score: 0
Accepted
time: 1ms
memory: 1576kb

input:

10 12 48
5 4 69
6 8 64
7 3 70
3 10 61
9 2 67
6 12 63
6 11 62
7 2 69
3 3 67
9 7 68
8 7 67
5 10 63
4 8 64
5 11 62
2 1 65
8 4 68
8 9 66
10 1 65
9 6 67
8 2 68
7 1 68
1 11 64
9 1 66
1 10 63
4 1 67
10 4 68
7 11 63
7 9 65
5 5 68
3 4 67
1 9 62
5 6 67
1 4 66
6 1 67
10 5 67
7 5 68
7 8 65
2 8 64
2 5 66
5 1 66
...

output:

7843

result:

ok "7843"

Test #53:

score: 0
Accepted
time: 1ms
memory: 1484kb

input:

19 32 23
13 19 3
1 15 -12
12 8 -8
15 29 2
7 16 -6
3 6 -1
16 30 0
17 19 7
19 26 0
3 17 -9
4 18 -7
10 4 -4
11 22 4
19 8 -4
19 27 -1
6 14 -7
14 32 2
1 13 -10
13 8 -8
11 12 -4
5 11 -7
17 26 2
2 31 -6

output:

-2431

result:

ok "-2431"

Test #54:

score: 0
Accepted
time: 1ms
memory: 1500kb

input:

28 31 4
8 27 76
27 5 89
24 13 80
1 31 65

output:

60784

result:

ok "60784"