### 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, October 2010
A ZOJ3406 Another Very Easy Task 34.45% (317/920)
B ZOJ3407 Doraemon’s Cake Machine 9.41% (55/584)
C ZOJ3408 Gao 8.38% (29/346)
D ZOJ3409 KKV 53.33% (8/15)
E ZOJ3410 Layton’s Escape 9.90% (99/999)
F ZOJ3411 Special Special Judge 18.87% (127/673)
G ZOJ3412 Special Special Judge II 30.23% (13/43)
H ZOJ3413 Special Special Judge III 4.79% (13/271)
I ZOJ3414 Trail Walk 34.31% (257/749)
J ZOJ3415 Zhou Yu 12.08% (11/91)

### ZOJ3406. Another Very Easy Task

source code (ZOJ3406.pl) [regex]

### ZOJ3407. Doraemon’s Cake Machine

source code (ZOJ3407.py) [math, enumeration]

Python里有个特殊的变量__name__，如果当前模块是主模块，则为’__main__’，否则为模块名。通过判断

`if __name__ == '__main__':`

```# gao.py
def scanl(s, f, a):
retval = [s]
for v in a:
s = f(s, v)
retval.append(s)
return retval

if __name__ == '__main__':
print scanl(1, int.__mul__, range(1, 10))
else:
print __name__, 'imported'
#> [1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880]
```

```# gaogao.py
import gao
print 'in' + __name__ + ':', sum(gao.scanl(10000000, int.__div__, range(1, 20)))
#> gao imported
#> in__main__: 27182814
```