about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-12-26 11:52:05 +0700
committerNguyễn Gia Phong <vn.mcsinyx@gmail.com>2018-12-26 11:52:05 +0700
commitd0ce1ee82b03ab0e0b9bf0184abb7ce0d0add00f (patch)
tree8a93094065ead1d7abbcfcd67c48245d0ed7b1ec
parent8d090c241f25b226a6533e066e5e7e21738d70be (diff)
downloadcp-d0ce1ee82b03ab0e0b9bf0184abb7ce0d0add00f.tar.gz
Practikal Informatiques
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2008/R1/BL1.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2008/R1/BL2.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2008/R1/BL3.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2008/R1/BL4.pas0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2008/R1/CLB.IN0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2008/R1/CLB.OU0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2008/R1/R1.DOCbin79872 -> 79872 bytes
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2008/R2/tbc.pas0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2009/R1/BTN.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2009/R1/HEXA.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2009/R1/PS.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2009/R2/BAI1.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2009/R2/BAI3.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2010/BAI1.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2010/BAI2.PAS0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2010/BAI3bin132580 -> 132580 bytes
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2010/BAI3.INP0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2010/BAI3.OUT0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2010/BAI3.obin4344 -> 4344 bytes
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2010/BAI3.pas0
-rw-r--r--[-rwxr-xr-x]12/TP-HN-2010/TP-2010.pngbin1251665 -> 1251665 bytes
-rw-r--r--[-rwxr-xr-x]12/TP-ThanhHoá-2009/bai4.py0
-rw-r--r--[-rwxr-xr-x]12/TP-ThanhHoá-2009/bai4pas_srcgen.py0
-rw-r--r--[-rwxr-xr-x]NTU/hamar.py0
-rw-r--r--[-rwxr-xr-x]NTU/sagain_geninp.py0
-rw-r--r--[-rwxr-xr-x]THT/B/QG-2014/DIC.DAT0
-rw-r--r--[-rwxr-xr-x]THT/B/QG-2014/sample.pas0
-rw-r--r--[-rwxr-xr-x]THT/B/QG-2016/remainder.py0
-rw-r--r--[-rwxr-xr-x]THT/B/QG-2016/trigrid.py0
-rw-r--r--[-rwxr-xr-x]THT/C/Q-2016/bai2.py0
-rw-r--r--[-rwxr-xr-x]THT/C/Q-2016/bai3.py0
-rwxr-xr-x[-rw-r--r--]THT/C/QG-2017/ImgViewer.exebin3203072 -> 3203072 bytes
-rw-r--r--[-rwxr-xr-x]THT/C/QG-2017/xxiii.py0
-rw-r--r--others/other/README.md10
-rwxr-xr-xthinkperl6/draft.p645
35 files changed, 55 insertions, 0 deletions
diff --git a/12/TP-HN-2008/R1/BL1.PAS b/12/TP-HN-2008/R1/BL1.PAS
index 6931b1b..6931b1b 100755..100644
--- a/12/TP-HN-2008/R1/BL1.PAS
+++ b/12/TP-HN-2008/R1/BL1.PAS
diff --git a/12/TP-HN-2008/R1/BL2.PAS b/12/TP-HN-2008/R1/BL2.PAS
index e228240..e228240 100755..100644
--- a/12/TP-HN-2008/R1/BL2.PAS
+++ b/12/TP-HN-2008/R1/BL2.PAS
diff --git a/12/TP-HN-2008/R1/BL3.PAS b/12/TP-HN-2008/R1/BL3.PAS
index a49b4d6..a49b4d6 100755..100644
--- a/12/TP-HN-2008/R1/BL3.PAS
+++ b/12/TP-HN-2008/R1/BL3.PAS
diff --git a/12/TP-HN-2008/R1/BL4.pas b/12/TP-HN-2008/R1/BL4.pas
index c552b0d..c552b0d 100755..100644
--- a/12/TP-HN-2008/R1/BL4.pas
+++ b/12/TP-HN-2008/R1/BL4.pas
diff --git a/12/TP-HN-2008/R1/CLB.IN b/12/TP-HN-2008/R1/CLB.IN
index 662c775..662c775 100755..100644
--- a/12/TP-HN-2008/R1/CLB.IN
+++ b/12/TP-HN-2008/R1/CLB.IN
diff --git a/12/TP-HN-2008/R1/CLB.OU b/12/TP-HN-2008/R1/CLB.OU
index e69de29..e69de29 100755..100644
--- a/12/TP-HN-2008/R1/CLB.OU
+++ b/12/TP-HN-2008/R1/CLB.OU
diff --git a/12/TP-HN-2008/R1/R1.DOC b/12/TP-HN-2008/R1/R1.DOC
index 5e29da2..5e29da2 100755..100644
--- a/12/TP-HN-2008/R1/R1.DOC
+++ b/12/TP-HN-2008/R1/R1.DOC
Binary files differdiff --git a/12/TP-HN-2008/R2/tbc.pas b/12/TP-HN-2008/R2/tbc.pas
index 1a26a91..1a26a91 100755..100644
--- a/12/TP-HN-2008/R2/tbc.pas
+++ b/12/TP-HN-2008/R2/tbc.pas
diff --git a/12/TP-HN-2009/R1/BTN.PAS b/12/TP-HN-2009/R1/BTN.PAS
index dbb022d..dbb022d 100755..100644
--- a/12/TP-HN-2009/R1/BTN.PAS
+++ b/12/TP-HN-2009/R1/BTN.PAS
diff --git a/12/TP-HN-2009/R1/HEXA.PAS b/12/TP-HN-2009/R1/HEXA.PAS
index a2fd6ca..a2fd6ca 100755..100644
--- a/12/TP-HN-2009/R1/HEXA.PAS
+++ b/12/TP-HN-2009/R1/HEXA.PAS
diff --git a/12/TP-HN-2009/R1/PS.PAS b/12/TP-HN-2009/R1/PS.PAS
index 6cf2d09..6cf2d09 100755..100644
--- a/12/TP-HN-2009/R1/PS.PAS
+++ b/12/TP-HN-2009/R1/PS.PAS
diff --git a/12/TP-HN-2009/R2/BAI1.PAS b/12/TP-HN-2009/R2/BAI1.PAS
index b28ae0b..b28ae0b 100755..100644
--- a/12/TP-HN-2009/R2/BAI1.PAS
+++ b/12/TP-HN-2009/R2/BAI1.PAS
diff --git a/12/TP-HN-2009/R2/BAI3.PAS b/12/TP-HN-2009/R2/BAI3.PAS
index 30eecdf..30eecdf 100755..100644
--- a/12/TP-HN-2009/R2/BAI3.PAS
+++ b/12/TP-HN-2009/R2/BAI3.PAS
diff --git a/12/TP-HN-2010/BAI1.PAS b/12/TP-HN-2010/BAI1.PAS
index 029201d..029201d 100755..100644
--- a/12/TP-HN-2010/BAI1.PAS
+++ b/12/TP-HN-2010/BAI1.PAS
diff --git a/12/TP-HN-2010/BAI2.PAS b/12/TP-HN-2010/BAI2.PAS
index d6639df..d6639df 100755..100644
--- a/12/TP-HN-2010/BAI2.PAS
+++ b/12/TP-HN-2010/BAI2.PAS
diff --git a/12/TP-HN-2010/BAI3 b/12/TP-HN-2010/BAI3
index 7b83e7b..7b83e7b 100755..100644
--- a/12/TP-HN-2010/BAI3
+++ b/12/TP-HN-2010/BAI3
Binary files differdiff --git a/12/TP-HN-2010/BAI3.INP b/12/TP-HN-2010/BAI3.INP
index 3609812..3609812 100755..100644
--- a/12/TP-HN-2010/BAI3.INP
+++ b/12/TP-HN-2010/BAI3.INP
diff --git a/12/TP-HN-2010/BAI3.OUT b/12/TP-HN-2010/BAI3.OUT
index e69de29..e69de29 100755..100644
--- a/12/TP-HN-2010/BAI3.OUT
+++ b/12/TP-HN-2010/BAI3.OUT
diff --git a/12/TP-HN-2010/BAI3.o b/12/TP-HN-2010/BAI3.o
index 7706cd6..7706cd6 100755..100644
--- a/12/TP-HN-2010/BAI3.o
+++ b/12/TP-HN-2010/BAI3.o
Binary files differdiff --git a/12/TP-HN-2010/BAI3.pas b/12/TP-HN-2010/BAI3.pas
index aedf9a0..aedf9a0 100755..100644
--- a/12/TP-HN-2010/BAI3.pas
+++ b/12/TP-HN-2010/BAI3.pas
diff --git a/12/TP-HN-2010/TP-2010.png b/12/TP-HN-2010/TP-2010.png
index 7eacc66..7eacc66 100755..100644
--- a/12/TP-HN-2010/TP-2010.png
+++ b/12/TP-HN-2010/TP-2010.png
Binary files differdiff --git a/12/TP-ThanhHoá-2009/bai4.py b/12/TP-ThanhHoá-2009/bai4.py
index f5c5a26..f5c5a26 100755..100644
--- a/12/TP-ThanhHoá-2009/bai4.py
+++ b/12/TP-ThanhHoá-2009/bai4.py
diff --git a/12/TP-ThanhHoá-2009/bai4pas_srcgen.py b/12/TP-ThanhHoá-2009/bai4pas_srcgen.py
index e345caa..e345caa 100755..100644
--- a/12/TP-ThanhHoá-2009/bai4pas_srcgen.py
+++ b/12/TP-ThanhHoá-2009/bai4pas_srcgen.py
diff --git a/NTU/hamar.py b/NTU/hamar.py
index 346edfa..346edfa 100755..100644
--- a/NTU/hamar.py
+++ b/NTU/hamar.py
diff --git a/NTU/sagain_geninp.py b/NTU/sagain_geninp.py
index 7764953..7764953 100755..100644
--- a/NTU/sagain_geninp.py
+++ b/NTU/sagain_geninp.py
diff --git a/THT/B/QG-2014/DIC.DAT b/THT/B/QG-2014/DIC.DAT
index af9c850..af9c850 100755..100644
--- a/THT/B/QG-2014/DIC.DAT
+++ b/THT/B/QG-2014/DIC.DAT
diff --git a/THT/B/QG-2014/sample.pas b/THT/B/QG-2014/sample.pas
index c8b5e17..c8b5e17 100755..100644
--- a/THT/B/QG-2014/sample.pas
+++ b/THT/B/QG-2014/sample.pas
diff --git a/THT/B/QG-2016/remainder.py b/THT/B/QG-2016/remainder.py
index c70faba..c70faba 100755..100644
--- a/THT/B/QG-2016/remainder.py
+++ b/THT/B/QG-2016/remainder.py
diff --git a/THT/B/QG-2016/trigrid.py b/THT/B/QG-2016/trigrid.py
index 0911ef9..0911ef9 100755..100644
--- a/THT/B/QG-2016/trigrid.py
+++ b/THT/B/QG-2016/trigrid.py
diff --git a/THT/C/Q-2016/bai2.py b/THT/C/Q-2016/bai2.py
index bb04c54..bb04c54 100755..100644
--- a/THT/C/Q-2016/bai2.py
+++ b/THT/C/Q-2016/bai2.py
diff --git a/THT/C/Q-2016/bai3.py b/THT/C/Q-2016/bai3.py
index f4139a9..f4139a9 100755..100644
--- a/THT/C/Q-2016/bai3.py
+++ b/THT/C/Q-2016/bai3.py
diff --git a/THT/C/QG-2017/ImgViewer.exe b/THT/C/QG-2017/ImgViewer.exe
index cd55196..cd55196 100644..100755
--- a/THT/C/QG-2017/ImgViewer.exe
+++ b/THT/C/QG-2017/ImgViewer.exe
Binary files differdiff --git a/THT/C/QG-2017/xxiii.py b/THT/C/QG-2017/xxiii.py
index ef9c317..ef9c317 100755..100644
--- a/THT/C/QG-2017/xxiii.py
+++ b/THT/C/QG-2017/xxiii.py
diff --git a/others/other/README.md b/others/other/README.md
index 0d4198b..d593fb3 100644
--- a/others/other/README.md
+++ b/others/other/README.md
@@ -979,3 +979,13 @@ lớn nhất.
 |                                VDD.INP                                 | VDD.OUT |
 | ---------------------------------------------------------------------- | :-----: |
 | 5 1 5<br>0 0 0 1 1<br>0 0 0 0 1<br>1 1 0 0 1<br>1 1 0 0 0<br>0 1 0 0 0 |    2    |
+
+## Số chữ số chính phương
+
+Viết chương trình in ra số lượng số chính phương có `n` chữ số.
+
+### Ví dụ
+
+| stdin | stdout |
+| :---: | :----: |
+|   2   |    6   |
diff --git a/thinkperl6/draft.p6 b/thinkperl6/draft.p6
index 7f74238..a8add76 100755
--- a/thinkperl6/draft.p6
+++ b/thinkperl6/draft.p6
@@ -84,3 +84,48 @@ sub estimate-pi {
     1 / $factor / Srinivasa-Ramanujan
 }
 #put abs estimate-pi() - pi;
+
+sub ducks { map * ~ 'ack' , flat('J'..'N', 'Ou', 'P', 'Qu') }
+#put ducks;
+
+sub count(Str $string, Str $substr, Int $index = 0, Int $result = 0) {
+    my $i = index $string, $substr, $index;
+    return $result if $i === Any;
+    count $string, $substr, $i + 1, $result + 1
+}
+#put count 'banana', 'na';
+
+sub bubble-sort(@seq is copy) {
+    my $done;
+    repeat {
+        $done = True;
+        for ^(@seq.elems - 1) -> $i {
+            if @seq[$i] > @seq[$i+1] {
+                (@seq[$i], @seq[$i+1]) = @seq[$i+1], @seq[$i];
+                $done = False
+            }
+        }
+    } until $done;
+    @seq
+}
+#put bubble-sort <4 2 6 5 3 9 1>;
+
+sub select-sort(@seq is copy) {
+    for ^(@seq.elems - 1) -> $i {
+        for $i..^@seq.elems -> $j {
+            (@seq[$i], @seq[$j]) = @seq[$j], @seq[$i] if @seq[$i] > @seq[$j]
+        }
+    }
+    @seq
+}
+#put select-sort <4 2 6 5 3 9 1>;
+
+sub insert-sort(@seq is copy) {
+    for 1..^@seq.elems -> $i {
+        loop (my $j = $i; $j and @seq[$j] < @seq[$j - 1]; $j--) {
+            (@seq[$j], @seq[$j - 1]) = @seq[$j - 1], @seq[$j] 
+        }
+    }
+    @seq
+}
+#put insert-sort <4 2 6 5 3 9 1>;