Слово
«evaltreeprint»впервые сказано пользователем
RPG 04.10.2011 в 21:07,
и с тех пор употреблялось
7 раз.
Сообщения со словом
«evaltreeprint»
Запрос выполнился за
0.0026 сек.
- 05.10.2011, 21:18. RPG в теме
«Встреча LUG-а в сентябре 2011 (для первокурсников)»
... t- right return operation oper size-1 opc a b char evaltreeprint tree t char a b buf if t null buf char malloc sizeof char 1 sprintf buf d ticket c c else a evaltreeprint t- left b evaltreeprint t- right buf char malloc sizeof char strlen a strlen b 4 sprintf buf s c s a operations str oper powi ops opc ops b free a free b return buf int main tree trees binarytrees size 1 int max powi ops size 1 int ticket num n i j eval char buf operation int int int malloc sizeof int int int max size-1 for i 0 i max i for j 0 j size-1 j operation i size-1 j operations i powi ops j ops for ticket num 100000 ticket num 104000 ticket num n ticket num for i 0 i size i ticket size i 1 n 10 n 10 for i 0 i btree size size-1 i for j 0 j max j oper j opc c 0 eval evaltree trees i if eval 100 opc c 0 buf evaltreeprint trees i printf d t s n ticket num buf...
- 04.10.2011, 21:07. RPG в теме
«Встреча LUG-а в сентябре 2011 (для первокурсников)»
... oper math pow operations opc-1 operations 1 b end evaltreeprint function tree if tree false then c c 1 return ticket c-1 else return op str evaltreeprint tree 1 evaltreeprint tree 2 end end local trees binarytrees ticket-1 local n for ticket num 100000 101000 do n ticket num for i 1 ticket do ticket ticket-i 1 n 10 n floor n 10 end for v in ipairs trees do for i 0 math pow operations 5 do c opc 1 0 oper i operbuf operation i if evaltree v 100 then c opc 1 0 print ticket num evaltreeprint v end end end end time luajit -o3 ticket...