CARVIEW |
Select Language
HTTP/2 200
date: Mon, 13 Oct 2025 16:33:58 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=2e63298d0678c4a9dd53fc43821910898f0c0e13e34fb3c8f40be078680ba710a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22kj998PjeYh5BzpeDxX6_JCSXqQ7xSjC8%22%3B%7D; HttpOnly; Path=/
cf-ray: 98e03de15b647679-BLR
program Permutations;{$APPTYPE CONSOLE}{$R *.res}uses System.SysU - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program Permutations;
- {$APPTYPE CONSOLE}
- {$R *.res}
- uses
- System.SysUtils;
- const
- n = 5; // Кол-во элементов массива
- type
- TArray = Array[1..n] of Integer;
- var
- A: TArray;
- i, j: Integer;
- f: Text;
- procedure FillArray(var A: TArray);
- var
- i: Integer;
- begin
- for i := 1 to n do
- A[i] := i;
- end;
- procedure Swap(var x, y: Integer);
- var
- temp: Integer;
- begin
- temp := x;
- x := y;
- y := temp;
- end;
- procedure Generate(var A: TArray; k: Integer);
- var
- i: Integer;
- str: String;
- begin
- if k = n then
- begin
- for i := 1 to n do
- begin
- str := IntToStr(A[i]) + ' ';
- Write(str);
- Write(f, str);
- end;
- Writeln;
- Writeln(f, '');
- end
- else
- for i := k + 1 to n do
- begin
- Swap(A[k + 1], A[i]);
- Generate(A, k + 1);
- Swap(A[k + 1], A[i]);
- end;
- end;
- begin
- Assign(f, 'info.txt');
- Rewrite(f);
- FillArray(A);
- Generate(A, 0);
- CloseFile(f);
- Readln;
- end.
Advertisement
Add Comment
Please, Sign In to add comment
-
✅ Make $2500 in 20 minutes⭐ X
JavaScript | 2 sec ago | 0.25 KB
-
🚀 Swapzone +37% glitch
JavaScript | 7 sec ago | 0.24 KB
-
📌 Swapzone +37% glitch ⭐ 5
JavaScript | 9 sec ago | 0.25 KB
-
🚨 Free Crypto Method 🚨
JavaScript | 16 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ⭐⭐ T
JavaScript | 17 sec ago | 0.25 KB
-
✅ Marketplace Glitch ✅ Working NEVER SEEN BE...
JavaScript | 25 sec ago | 0.25 KB
-
💡 Instant BTC Profit Method ✅ Working
JavaScript | 25 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ H
JavaScript | 33 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand