eg. 5
1 -> ? -> 5
2 -> ? -> 4
3 -> ? -> 3
4 -> ? -> 2
5 -> ? -> 1
Case1:
1 -> ? -> 5 -> ? -> 1
2 -> ? -> 4 -> ? -> 2
merge above
1 -> 2 -> 5 -> 4 -> 1
Case2:
3 -> 3 -> 3
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
eg. 5
1 -> ? -> 5
2 -> ? -> 4
3 -> ? -> 3
4 -> ? -> 2
5 -> ? -> 1
Case1:
1 -> ? -> 5 -> ? -> 1
2 -> ? -> 4 -> ? -> 2
merge above
1 -> 2 -> 5 -> 4 -> 1
Case2:
3 -> 3 -> 3
some tips about problem A
a=2 b=3 c=4 total=18
O O O O
O O O O O
O O O O O
O O O O
`a=1` b=4 c=5 total=20 0:2 O:18
O O O O 0
O O O O O
O O O O O
0 O O O O
a=4 `b=1` c=6 total=24 0:6 O:18
0 0 O O O O
0 O O O O O
O O O O O 0
O O O O 0 0
a=5 b=6 `c=1` total=30 0:12 O:18
0
0 0
0 0 0
O O O O
O O O O O
O O O O O
O O O O
0 0 0
0 0
0
cout << (a+c-1)*(b+c-1)-c*(c-1) << endl;
You can see this submission 2013799.
f4 | 3 | - | 9 | - |
f3 | 2 | 4 | 8 | 10 |
f2 | | 5 | | 11 |
f1 | 0 | 6 | - | 12 |
I guess the case "int(100*0.94) == 93" may be like this process:
24 step :
0,0,0,1,0,0,0,1,0,0,0,1,2,0,0,0,1,0,0,0,1,0,0,0
---------------------------------------------------
0:
+---+ | 5 | +---+---+---+---+ | 3 | 0 | 1 | 2 | -----> +---+---+---+---+ | 4 | +---++---+ | 1 | +---+---+---+---+ | 5 | 0 | 4 | 2 | +---+---+---+---+ | 3 | +---+1:+---+ | 5 | +---+---+---+---+ | 3 | 0 | 1 | 2 | -----> +---+---+---+---+ | 4 | +---++---+ | 5 | +---+---+---+---+ | 0 | 1 | 2 | 3 | +---+---+---+---+ | 4 | +---+2:+---+ | 5 | +---+---+---+---+ | 3 | 0 | 1 | 2 | -----> +---+---+---+---+ | 4 | +---++---+ | 1 | +---+---+---+---+ | 4 | 2 | 5 | 0 | +---+---+---+---+ | 3 | +---+
Name |
---|