Форум: "Прочее";
Текущий архив: 2006.03.26;
Скачать: [xml.tar.bz2];
ВнизНарод, киньте ссылку Найти похожие ветки
← →
Ega23 © (2006-03-01 17:51) [0]Был какой-то исходник на C++, там рекурсивно main вызывался. Всё одной жуткой строкой.
← →
Kerk © (2006-03-01 17:54) [1]
int main () {
return main();
}
?
:))))
← →
Ega23 © (2006-03-01 17:55) [2]Да не, там что-то страшное было...
← →
oldman © (2006-03-01 17:58) [3]
> Ega23 © (01.03.06 17:55) [2]
ты компу задачу ставишь или напугать хочешь?
:))))))))
← →
Ega23 © (2006-03-01 18:00) [4]Да был пример, как можно, но НЕ НАДО писать на С
← →
Yanis © (2006-03-01 18:01) [5]А [1] разве не страшно :)
← →
Ega23 © (2006-03-01 18:14) [6]вот, нашёл...
#include <stdio.h>
main(t,_,a)char *a;{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86,0,a+1)+a)):1,t<_?main(t+1,_,a):3,main(-94,-27+t,a)&&t==2?_<13?
main(2,_+1,"%s %d %d\n"):9:16:t<0?t<-72?main(_,t,
"@n"+,#"/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#\
;#q#n+,/+k#;*+,/"r :"d*"3,}{w+K w"K:"+}e#";dq#"l \
q#"+d"K#!/+k#;q#"r}eKK#}w"r}eKK{nl]"/#;#q#n"){)#}w"){){nl]"/+#n";d}rw" i;# \
){nl]!/n{n#"; r{#w"r nc{nl]"/#{l,+"K {rw" iK{;[{nl]"/w#q#n"wk nw" \
iwk{KK{nl]!/w{%"l##w#" i; :{nl]"/*{q#"ld;r"}{nlwb!/*de}"c \
;;{nl"-{}rw]"/+,}##"*}#nc,",#nw]"/+kd"+e}+;#"rdq#w! nr"/ ") }+}{rl#"{n" ")# \
}"+}##(!!/")
:t<-50?_==*a?putchar(31[a]):main(-65,_,a+1):main((*a=="/")+t,_,a+1)
:0<t?main(2,2,"%s"):*a=="/"||main(0,main(-61,*a,
"!ek;dc i@bK"(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
← →
oldman © (2006-03-01 18:29) [7]
> Ega23 © (01.03.06 18:14) [6]
бе-е-е...
← →
Igorek © (2006-03-01 19:13) [8]
main(t,_,a)
char *a;
{
return
! 0<t
? t<3
? main(
-79,
-13,
a + main(
-87,
1-_,
main(
-86,
0,
a+1
)+a
)
)
:1, t<_
? main(
t+1,
_,
a
)
:3, main(
-94,
-27+t,
a
) && t==2
? _<13
? main(2,_+1,"%s %d %d\n")
: 9
: 16
: t<0
? t<-72
? main(
_,
t,
"@n"+,#"/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l+,/n{n+,/+#n+,/#\
;#q#n+,/+k#;*+,/"r :"d*"3,}{w+K w"K:"+}e#";dq#"l \
q#"+d"K#!/+k#;q#"r}eKK#}w"r}eKK{nl]"/#;#q#n"){)#}w"){){nl]"/+#n";d}rw" i;# \
){nl]!/n{n#"; r{#w"r nc{nl]"/#{l,+"K {rw" iK{;[{nl]"/w#q#n"wk nw" \
iwk{KK{nl]!/w{%"l##w#" i; :{nl]"/*{q#"ld;r"}{nlwb!/*de}"c \
;;{nl"-{}rw]"/+,}##"*}#nc,",#nw]"/+kd"+e}+;#"rdq#w! nr"/ ") }+}{rl#"{n" ")# \
}"+}##(!!/"
)
: t<-50
? _==*a
? putchar(31[a])
: main(
-65,
_,
a+1
)
: main(
(*a=="/")+t,
_,
a+1
)
: 0<t
? main(
2,
2,
"%s"
)
: *a=="/" || main(
0,
main(
-61,
*a,
"!ek;dc i@bK"(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"
),
a+1
);
}
← →
Igorek © (2006-03-01 19:14) [9]Жаль символы табуляции не взялись.
А код наверно был закомментирован вначале.
← →
oldman © (2006-03-01 19:16) [10]
> Igorek © (01.03.06 19:13) [8]
:)))
можно еще так:
m
a
i
n
(
t
,
_
,
a
)
c
h
a
r
*
a
;
{
r
e
t
u
r
n
...
:)))
← →
VictorT © (2006-03-01 19:25) [11]oldman © (01.03.06 19:16) [10]
не, так нельзя
← →
DesWind © (2006-03-01 21:11) [12]А результат выполнения этой программы какой, что она делает?
← →
Marser © (2006-03-01 21:13) [13]> [6] Ega23 © (01.03.06 18:14)
Волосы шевелились...
← →
TUser © (2006-03-02 07:11) [14]> А результат выполнения этой программы какой, что она делает?
Стишок печатает, рекурсивный, типа "Вот атом, который построил Бор".
← →
Yanis © (2006-03-02 07:33) [15]2 [6]
Кто же это придумал?
← →
TUser © (2006-03-02 07:40) [16]> Кто же это придумал?
Вестимо - сишники )
← →
Ученик чародея © (2006-03-02 08:23) [17]Ну а как вам такая процедурка?
procedure outdate(var table:strukt;mura:mur;graph:algoritm);
var
i,j,k,m:byte;
bytestr:bat;
bytestr1:bat;
f1:text;
begin
assign(f1,"out.dat");
rewrite(f1);
if mura.mu=1 then
writeln(f1,"Автомат Мура");
if mura.mi=1 then
writeln(f1,"Автомат Мили");
writeln(f1,"");
for i:=1 to mura.N_max do
begin
tranlate(mura.dugi[i].N_vershini,bytestr);
write(f1,"¦ИС");
for j:=mura.N_trig-1 downto 0 do
write(f1," ",bytestr[j]);
tranlate(mura.dugi[i].N_Dir,bytestr);
write(f1,"¦ СП");
for j:=mura.N_trig-1 downto 0 do
write(f1," ",bytestr[j]);
write(f1,"¦ X");
for j:=1 to graph.n_x do
begin
m:=0;
for k:=1 to mura.dugi[i].N_X do
if (mura.dugi[i].X[k]=j) then
begin
write(f1," ",mura.dugi[i].X_val[k]);
m:=1;
end;
if m=0 then write(f1," *");
end;
write(f1,"¦ Y");
for j:=1 to mura.dugi[i].N_Y do
write(f1," ",mura.dugi[i].Y[j]);
if mura.D=1 then
begin
tranlate(mura.dugi[i].D,bytestr);
write(f1,"¦D");
for j:=mura.N_trig-1 downto 0 do
write(f1," D",J,"(",bytestr[j],")");
end;
if mura.rs=1 then
begin
tranlate(mura.dugi[i].R,bytestr);
tranlate(mura.dugi[i].S,bytestr1);
write(f1,"¦RS");
for j:=mura.N_trig-1 downto 0 do
write(f1," R",J,"(",bytestr[j],")"," S",j,"(",bytestr1[j],")");
end;
if mura.Jk=1 then
begin
tranlate(mura.dugi[i].j,bytestr);
tranlate(mura.dugi[i].k,bytestr1);
write(f1,"¦JK");
for j:=mura.N_trig-1 downto 0 do
write(f1," J",J,"(",bytestr[j],")"," K",j,"(",bytestr1[j],")");
end;
writeln(f1,"¦");
end;
writeln(f1,"");
{*******************************}
if table.D=1 then
for i:=1 to table.dnf.N_D do
begin
write(f1,"D",i-1,"= ");
if table.dnf.D[i].N_F<>0 then
for j:=1 to table.dnf.D[i].N_F do
begin
for k:=table.N_trig-1 downto 0 do
write(f1,"Q",k,"(",table.dnf.D[i].F[j].Q_in[k],")");
for k:=1 to table.dnf.D[i].F[j].N_X do
write(f1,"X",table.dnf.D[i].F[j].X[k],"(",
table.dnf.D[i].F[j].X_Val[k],")");
write(f1,"\/");
end;
writeln(f1,"");
end;
{********************************}
{*******************************}
if table.RS=1 then
for i:=1 to table.dnf.N_RS do
begin
write(f1,"R",i-1,"= ");
if table.dnf.R[i].N_F<>0 then
for j:=1 to table.dnf.R[i].N_F do
begin
for k:=table.N_trig-1 downto 0 do
write(f1,"Q",k,"(",table.dnf.R[i].F[j].Q_in[k],")");
for k:=1 to table.dnf.R[i].F[j].N_X do
write(f1,"X",table.dnf.R[i].F[j].X[k],"(",
table.dnf.R[i].F[j].X_Val[k],")");
write(f1,"\/");
end;
writeln(f1,"");
write(f1,"S",i-1,"= ");
if table.dnf.S[i].N_F<>0 then
for j:=1 to table.dnf.S[i].N_F do
begin
for k:=table.N_trig-1 downto 0 do
write(f1,"Q",k,"(",table.dnf.S[i].F[j].Q_in[k],")");
for k:=1 to table.dnf.S[i].F[j].N_X do
write(f1,"X",table.dnf.S[i].F[j].X[k],"(",
table.dnf.S[i].F[j].X_Val[k],")");
write(f1,"\/");
end;
writeln(f1,"");
end;
{********************************}
{*******************************}
if table.JK=1 then
for i:=1 to table.dnf.N_JK do
begin
write(f1,"J",i-1,"= ");
if table.dnf.J[i].N_F<>0 then
for j:=1 to table.dnf.J[i].N_F do
begin
for k:=table.N_trig-1 downto 0 do
write(f1,"Q",k,"(",table.dnf.J[i].F[j].Q_in[k],")");
for k:=1 to table.dnf.J[i].F[j].N_X do
write(f1,"X",table.dnf.J[i].F[j].X[k],"(",
table.dnf.J[i].F[j].X_Val[k],")");
write(f1,"\/");
end;
writeln(f1,"");
write(f1,"K",i-1,"= ");
if table.dnf.J[i].N_F<>0 then
for j:=1 to table.dnf.K[i].N_F do
begin
for k:=table.N_trig-1 downto 0 do
write(f1,"Q",k,"(",table.dnf.K[i].F[j].Q_in[k],")");
for k:=1 to table.dnf.K[i].F[j].N_X do
write(f1,"X",table.dnf.K[i].F[j].X[k],"(",
table.dnf.K[i].F[j].X_Val[k],")");
write(f1,"\/");
end;
writeln(f1,"");
end;
{********************************}
{*******************************}
for i:=1 to table.dnf.N_Y do
begin
write(f1,"Y",i,"= ");
if table.dnf.Y[i].N_F<>0 then
for j:=1 to table.dnf.Y[i].N_F do
begin
for k:=table.N_trig-1 downto 0 do
write(f1,"Q",k,"(",table.dnf.Y[i].F[j].Q_in[k],")");
if mura.mi=1 then
begin
for k:=1 to table.dnf.Y[i].F[j].N_X do
write(f1,"X",table.dnf.Y[i].F[j].X[k],"(",
table.dnf.Y[i].F[j].X_Val[k],")");
end;
write(f1,"\/");
end;
writeln(f1,"");
end;
{********************************}
close(f1);
end;
procedure date(var table:strukt;mura:mur;graph:algoritm);
var
i,j,k,m:byte;
bytestr:bat;
last:byte;
f1:text;
begin
table.N_max:=mura.N_max;
table.Rs:=mura.RS;
table.D:=mura.d;
table.jk:=mura.jk;
table.N_trig:=mura.N_trig;
for i:=1 to mura.N_max do
begin
tranlate(mura.dugi[i].N_vershini,bytestr);
table.dugi[i].N_vershini:=bytestr;
tranlate(mura.dugi[i].N_Dir,bytestr);
table.dugi[i].N_Dir:=bytestr;
{table.dugi[i].N_X:=graph.n_x;}
for j:=1 to graph.n_x do
begin
m:=0;
for k:=1 to mura.dugi[i].N_X do
if (mura.dugi[i].X[k]=j) then
begin
table.dugi[i].X_val[j]:=mura.dugi[i].X_val[k];
m:=1;
end;
if m=0 then table.dugi[i].X_val[j]:=0;
end;
table.dugi[i].N_Y:=mura.dugi[i].N_Y;
table.dugi[i].Y:=mura.dugi[i].Y;
tranlate(mura.dugi[i].R,bytestr);
table.dugi[i].R:=bytestr;
tranlate(mura.dugi[i].s,bytestr);
table.dugi[i].s:=bytestr;
tranlate(mura.dugi[i].d,bytestr);
table.dugi[i].d:=bytestr;
tranlate(mura.dugi[i].j,bytestr);
table.dugi[i].j:=bytestr;
tranlate(mura.dugi[i].k,bytestr);
table.dugi[i].k:=bytestr;
end;
table.dnf.N_d:=mura.N_trig;
table.dnf.N_rs:=mura.N_trig;
table.dnf.N_jk:=mura.N_trig;
table.dnf.N_Y:=mura.dugi[1].N_Y;
if mura.d=1 then
for i:=1 to mura.N_trig do
begin
table.dnf.D[i].N_F:=0;
for j:=1 to table.N_max do
if table.dugi[j].D[i-1]=1 then
begin
table.dnf.D[i].N_F:=table.dnf.D[i].N_F+1;
table.dnf.D[i].F[table.dnf.D[i].N_F].Q_in:=table.dugi[j].N_vershini;
table.dnf.D[i].F[table.dnf.D[i].N_F].N_X:=mura.dugi[j].N_X;
table.dnf.D[i].F[table.dnf.D[i].N_F].X:=mura.dugi[j].X;
table.dnf.D[i].F[table.dnf.D[i].N_F].X_Val:=mura.dugi[j].X_Val;
end;
end;
if mura.rs=1 then
begin
for i:=1 to mura.N_trig do
begin
table.dnf.R[i].N_F:=0;
for j:=1 to table.N_max do
if table.dugi[j].R[i-1]=1 then
begin
table.dnf.R[i].N_F:=table.dnf.R[i].N_F+1;
table.dnf.R[i].F[table.dnf.R[i].N_F].Q_in:=table.dugi[j].N_vershini;
table.dnf.R[i].F[table.dnf.R[i].N_F].N_X:=mura.dugi[j].N_X;
table.dnf.R[i].F[table.dnf.R[i].N_F].X:=mura.dugi[j].X;
table.dnf.R[i].F[table.dnf.R[i].N_F].X_Val:=mura.dugi[j].X_Val;
end;
end;
for i:=1 to mura.N_trig do
begin
table.dnf.S[i].N_F:=0;
for j:=1 to table.N_max do
if table.dugi[j].S[i-1]=1 then
begin
table.dnf.S[i].N_F:=table.dnf.S[i].N_F+1;
table.dnf.S[i].F[table.dnf.S[i].N_F].Q_in:=table.dugi[j].N_vershini;
table.dnf.S[i].F[table.dnf.S[i].N_F].N_X:=mura.dugi[j].N_X;
table.dnf.S[i].F[table.dnf.S[i].N_F].X:=mura.dugi[j].X;
table.dnf.S[i].F[table.dnf.S[i].N_F].X_Val:=mura.dugi[j].X_Val;
end;
end;
end;
← →
MeF Dei Corvi © (2006-03-02 08:26) [18]Вполне читабельно :)
Страницы: 1 вся ветка
Форум: "Прочее";
Текущий архив: 2006.03.26;
Скачать: [xml.tar.bz2];
Память: 0.51 MB
Время: 0.045 c