### Posts Tagged “solution”

ZOJ Monthly, December 2010
A ZOJ3446 Doraemon’s Battle 13.84% (54/390)
B ZOJ3447 Doraemon’s Number Game 29.66% (35/118)
C ZOJ3448 Doraemon’s Number Game II 0.00% (0/4)
D ZOJ3449 Doraemon’s Number Game III 18.77% (40/213)
E ZOJ3450 Doraemon’s Railgun 11.28% (22/195)
F ZOJ3451 Doraemon’s Shooting Practice 8.33% (2/24)
G ZOJ3452 Doraemon’s Stone Game 33.89% (20/59)
H ZOJ3453 Doraemon’s Sweet Bullet 25.00% (5/20)
I ZOJ3454 Nobita’s Letter 36.36% (8/22)
J ZOJ3455 Shizuka’s Letter 27.95% (26/93)
K ZOJ3456 Traveler Nobita 7.50% (3/40)

### ZOJ3446. Doraemon’s Battle

source code (ZOJ3446.cpp) [search, bfs]

Doraemon初始有lh的血量和0的技能值，有n个敌人，他每回合有4种选择：

• 消灭一个敌人并增加一个技能值；
• 回复lh/5血量；
• 用尽现有技能值s，打掉Ds个敌人；
• 不动。

Doraemon回合之后，若剩下m个敌人，则其血量减少m，技能值增加m%3。Doraemon的血量若小于等于0，就挂了。问最少多少回合消灭所有敌人。

### ZOJ3447. Doraemon’s Number Game

source code (ZOJ3447.py) [greedy, BigInteger]

### ZOJ3441. Crack Me II

[cpp + indent, sorting, set_difference]

```cpp ZOJ3441txt.c > ZOJ3441cpp.c
```

```indent ZOJ3441cpp.c
```

### ZOJ3440. Detect the Virus II

[regex, topSort]

```# subparta:=fg|g
\$subparta = qr(fg|g);
# parta:=a|b|c
\$parta = qr{a|b|c};
# partb:=d|e[subparta]h
\$partb = qr{d|e(\$subparta)h};
# virus:=[parta][partb][partb]
\$virus = qr{(\$parta)(\$partb)(\$partb)};

printf 'abcdefghijklm' =~ \$virus ? "YES\n" : "NO\n";
printf 'nopqrstuvwxyz' =~ \$virus ? "YES\n" : "NO\n";
```

ZOJ在建站105个月之后迎来了第一百场比赛。

””\\(￣ー￣) (￣ー￣)//””

Let’s Celebrate the 100th Contest on ZOJ!
100A ZOJ3437 Very Hard Problem 6.89% (28/406)
100B ZOJ3438 Tripartite Graph 62.28% (71/114)
100C ZOJ3439 Substitution Cipher 7.86% (36/458)
100D ZOJ3440 Detect the Virus II 0.00% (0/26)
100E ZOJ3441 Crack Me II 2.06% (2/97)
100F ZOJ3442 Complex Calculator 0.00% (0/1)
100G ZOJ3443 Bessel Function II 0.00% (0/0)
100H ZOJ3444 An Unusual Problem 5.12% (2/39)
100I ZOJ3445 1KB 9.09% (4/44)

ZOJ Monthly, November 2010
A ZOJ3427 Array Slicing 21.05% (56/266)
B ZOJ3428 Bug Races 25.00% (2/8)
C ZOJ3429 Cube Simulation 22.94% (131/571)
D ZOJ3430 Detect the Virus 8.23% (40/486)
E ZOJ3431 Escape! 9.90% (21/212)
F ZOJ3432 Find the Lost Sock 18.38% (257/1398)
G ZOJ3433 Gu Jian Qi Tan 17.41% (39/224)
H ZOJ3434 Hiiragi’s Sticks 23.68% (9/38)
I ZOJ3435 Ideal Puzzle Bobble 4.87% (2/41)
J ZOJ3436 July Number 13.15% (15/114)

### ZOJ3427. Array Slicing

source code (ZOJ3427.cpp) [regex, simulation, slice, splice]

### ZOJ3428. Bug Races

source code (ZOJ3428.cpp) [Number theory, Pythagorean triple, Euclid's formula, counting]