@echo off
net use >netuse.tmp
SET DISK1=OFF
SET DISK2=OFF
SET DISK3=OFF
FOR /F "tokens=*" %%a in ('findstr.exe "\\\\192.168.0.111\\all" netuse.tmp') DO (
SET DISK1=ON
)
FOR /F "tokens=*" %%a in ('findstr.exe "\\\\192.168.0.111\\backup" netuse.tmp') DO (
SET DISK2=ON
)
FOR /F "tokens=*" %%a in ('findstr.exe "\\\\192.168.0.111\\ro" netuse.tmp') DO (
SET DISK3=ON
)
if "%DISK1%" == "OFF" (net use ? \\192.168.0.111\all)
if "%DISK2%" == "OFF" (net use ? \\192.168.0.111\backup)
if "%DISK3%" == "OFF" (net use ? \\192.168.0.111\ro)
@echo off
set a=NO
FOR /F %%a in ('net use ^| findstr.exe "\\\\192.168.0.111\\all"') DO (
set a=%%a
)
if "%a%"=="OK" GOTO NEXT2
net use ? \\192.168.0.111\all
:NEXT2
set a=NO
FOR /F %%a in ('net use ^| findstr.exe "\\\\192.168.0.111\\backup"') DO (
set a=%%a
)
if "%a%"=="OK" GOTO NEXT3
net use ? \\192.168.0.111\backup
:NEXT3
set a=NO
FOR /F %%a in ('net use ^| findstr.exe "\\\\192.168.0.111\\ro"') DO (
set a=%%a
)
if "%a%"=="OK" GOTO NEXT4
net use ? \\192.168.0.111\ro
:NEXT4
const
maxn = 100;
var
a: array[1..maxn] of longint;
i, j, r, n: longint;
begin
readln(n);
for i:= 1 to n do
read(a[i]);
for i:= 1 to n-1 do
for j:= i+1 to n do
if a[j] > a[j-1] then
begin
r:= a[j]; a[j]:= a[j-1]; a[j-1]:= r;
end;
for i:= 1 to n do
write(a[i], ' ');
writeln;
end.
const
maxn = 100;
var
a: array[1..maxn] of longint ;
i, j, r,n : longint;
begin
readln(n);
for i:= 1 to n do
read(a[i]);
for i:= 1 to n do
for j:= 1 to n-i do
if a[j] > a[j+1] then
begin
r:= a[j]; a[j]:= a[j+1]; a[j+1]:= r;
end;
for i:= 1 to n do
write(a[i], ' ');
writeln;
end.