about summary refs log tree commit diff
path: root/12
diff options
context:
space:
mode:
authorRaphael McSinyx <vn.mcsinyx@gmail.com>2016-11-06 11:13:14 +0700
committerRaphael McSinyx <vn.mcsinyx@gmail.com>2016-11-06 11:13:14 +0700
commit7de121c4b4ef888a0d1990c27144a7f9dd8c5f94 (patch)
tree2a298c9a957ad490cf8251ab264413f4effa9dce /12
parente4767bb46d1d759f9c863704e3f347d2a0c8c49a (diff)
downloadcp-7de121c4b4ef888a0d1990c27144a7f9dd8c5f94.tar.gz
Thêm đề HSG 12 huyện Vĩnh Tường, Vĩnh Phúc
Diffstat (limited to '12')
-rw-r--r--12/Q-VĩnhTường-2006/README.md72
-rw-r--r--12/Q-VĩnhTường-2006/cau1.c20
-rw-r--r--12/Q-VĩnhTường-2006/cau2.c39
-rw-r--r--12/Q-VĩnhTường-2006/cau3.c40
-rw-r--r--12/Q-VĩnhTường-2006/cau4.c26
-rwxr-xr-x12/TP-2008/R1/.BL4.pas.swpbin12288 -> 0 bytes
-rw-r--r--12/TP-2008/R2/.DG.pas.swpbin12288 -> 0 bytes
-rwxr-xr-x12/TP-HN-2008/R1/BL1.PAS (renamed from 12/TP-2008/R1/BL1.PAS)0
-rwxr-xr-x12/TP-HN-2008/R1/BL2.PAS (renamed from 12/TP-2008/R1/BL2.PAS)0
-rwxr-xr-x12/TP-HN-2008/R1/BL3.PAS (renamed from 12/TP-2008/R1/BL3.PAS)0
-rwxr-xr-x12/TP-HN-2008/R1/BL4.pas (renamed from 12/TP-2008/R1/BL4.pas)0
-rwxr-xr-x12/TP-HN-2008/R1/CLB.IN (renamed from 12/TP-2008/R1/CLB.IN)0
-rwxr-xr-x12/TP-HN-2008/R1/CLB.OU (renamed from 12/TP-2008/R1/CLB.OU)0
-rwxr-xr-x12/TP-HN-2008/R1/R1.DOC (renamed from 12/TP-2008/R1/R1.DOC)bin79872 -> 79872 bytes
-rwxr-xr-x12/TP-HN-2008/R2/DG (renamed from 12/TP-2008/R2/DG)bin133348 -> 133348 bytes
-rwxr-xr-x12/TP-HN-2008/R2/DG.INP (renamed from 12/TP-2008/R2/DG.INP)0
-rwxr-xr-x12/TP-HN-2008/R2/DG.OUT (renamed from 12/TP-2008/R2/DG.OUT)0
-rwxr-xr-x12/TP-HN-2008/R2/DG.o (renamed from 12/TP-2008/R2/DG.o)bin9392 -> 9392 bytes
-rwxr-xr-x12/TP-HN-2008/R2/DG.pas (renamed from 12/TP-2008/R2/DG.pas)0
-rw-r--r--12/TP-HN-2008/R2/HC.pas (renamed from 12/TP-2008/R2/HC.pas)0
-rwxr-xr-x12/TP-HN-2008/R2/R2.doc (renamed from 12/TP-2008/R2/R2.doc)bin64512 -> 64512 bytes
-rwxr-xr-x12/TP-HN-2008/R2/TBC.PAS (renamed from 12/TP-2008/R2/TBC.PAS)0
-rwxr-xr-x12/TP-HN-2009/R1/BTN.PAS (renamed from 12/TP-2009/R1/BTN.PAS)0
-rwxr-xr-x12/TP-HN-2009/R1/HEXA.PAS (renamed from 12/TP-2009/R1/HEXA.PAS)0
-rwxr-xr-x12/TP-HN-2009/R1/PS.PAS (renamed from 12/TP-2009/R1/PS.PAS)0
-rwxr-xr-x12/TP-HN-2009/R1/R1.pdf (renamed from 12/TP-2009/R1/R1.pdf)bin65142 -> 65142 bytes
-rwxr-xr-x12/TP-HN-2009/R2/BAI1.PAS (renamed from 12/TP-2009/R2/BAI1.PAS)0
-rwxr-xr-x12/TP-HN-2009/R2/BAI3.PAS (renamed from 12/TP-2009/R2/BAI3.PAS)0
-rwxr-xr-x12/TP-HN-2009/R2/R2.pdf (renamed from 12/TP-2009/R2/R2.pdf)bin103168 -> 103168 bytes
-rwxr-xr-x12/TP-HN-2010/BAI1.PAS (renamed from 12/TP-2010/BAI1.PAS)0
-rwxr-xr-x12/TP-HN-2010/BAI2.PAS (renamed from 12/TP-2010/BAI2.PAS)0
-rwxr-xr-x12/TP-HN-2010/BAI3 (renamed from 12/TP-2010/BAI3)bin132580 -> 132580 bytes
-rwxr-xr-x12/TP-HN-2010/BAI3.INP (renamed from 12/TP-2010/BAI3.INP)0
-rwxr-xr-x12/TP-HN-2010/BAI3.OUT (renamed from 12/TP-2010/BAI3.OUT)0
-rwxr-xr-x12/TP-HN-2010/BAI3.o (renamed from 12/TP-2010/BAI3.o)bin4344 -> 4344 bytes
-rwxr-xr-x12/TP-HN-2010/BAI3.pas (renamed from 12/TP-2010/BAI3.pas)0
-rw-r--r--12/TP-HN-2010/README.md (renamed from 12/TP-2010/README.md)0
-rwxr-xr-x12/TP-HN-2010/TP-2010.png (renamed from 12/TP-2010/TP-2010.png)bin1251665 -> 1251665 bytes
-rw-r--r--12/TP-HN-2010/_BAI3.pas (renamed from 12/TP-2010/_BAI3.pas)0
39 files changed, 197 insertions, 0 deletions
diff --git a/12/Q-VĩnhTường-2006/README.md b/12/Q-VĩnhTường-2006/README.md
new file mode 100644
index 0000000..a4c8dad
--- /dev/null
+++ b/12/Q-VĩnhTường-2006/README.md
@@ -0,0 +1,72 @@
+# ĐỀ THI HSG LỚP 12 HUYỆN VĨNH TƯỜNG NĂM HỌC 2006-2007
+
+Môn: Tin học
+Thời gian: 150 phút (không kể thời gian giao đề).
+
+## Câu 1 (5 điểm)
+
+Nhập vào một số nhị phân có `n` chữ số (`n` < 100). Hãy in ra số dư khi chia số
+đó cho 3.
+
+Ví dụ:
+
+n  |   Số nhị phân   | Kết quả
+-- | --------------- | -------
+3  | 101             | 2
+8  | 10100111        | 2
+12 | 100000001101    | 0
+14 | 11001111101110  | 1
+6  | 111111          | 0
+15 | 111111111111110 | 0
+
+## Câu 2 (4 điểm)
+
+Nhập vào số nguyên dương `n`. Hãy in ra số nguyên tố nhỏ nhất lớn hơn `n`.
+
+Ví dụ:
+
+  n  | Kết quả
+---- | -------
+10   | 11
+7    | 11
+44   | 47
+992  | 997
+2332 | 2333
+
+## Câu 3 (8 điểm)
+
+Nhập vào từ số nguyên dương `n` (`n` < 1000).
+
+1. Phân tích `n` thành tích các thừa số nguyên tố.
+2. Tìm các số tự nhiên nhỏ hơn hoặc bằng `n` mà sau khi làm phép phân tích ở
+   phần 1 có nhiều nhân tử nhất.
+
+Ví dụ:
+
+ n  | Kết quả
+--- | -------
+9   | 3 3
+    | 8
+15  | 3 5
+    | 8 12
+21  | 3 7
+    | 16
+70  | 2 5 7
+    | 64
+150 | 2 3 5 5
+    | 128
+
+## Câu 4
+
+Nhập vào một mảng gồm `n` (`n` < 20) số nguyên dương. Hãy đếm xem trong mảng có
+bao nhiêu số bậc thang. Biết một số được gọi là số bậc thang nếu biểu diễn thập
+phân của nó có nhiều hơn một chữ số đồng thời theo chiều từ trái qua phải, chữ
+số đứng sau không nhỏ hơn chữ số đứng trước.
+
+Ví dụ:
+
+n |          Dãy số          | Kết quả
+- | ------------------------ | -------
+7 | 1 4 7 5 8 9 3            | 0
+5 | 123 102 10023 9 21       | 1
+6 | 115 110 11112 31 14 1109 | 3
diff --git a/12/Q-VĩnhTường-2006/cau1.c b/12/Q-VĩnhTường-2006/cau1.c
new file mode 100644
index 0000000..173e7c2
--- /dev/null
+++ b/12/Q-VĩnhTường-2006/cau1.c
@@ -0,0 +1,20 @@
+#include <stdio.h>
+#include <string.h>
+
+int main()
+{
+	char b[100], i;
+	short a = 0;
+
+	scanf("%s", b);
+
+	for (i = strlen(b) - 1; i >= 0; i -= 2)
+		a += b[i] - 48;
+
+	for (i = strlen(b) - 2; i >= 0; i -= 2)
+		a += b[i] * 2 - 96;
+
+	printf("%d\n", a % 3);
+
+	return 0;
+}
diff --git a/12/Q-VĩnhTường-2006/cau2.c b/12/Q-VĩnhTường-2006/cau2.c
new file mode 100644
index 0000000..4ad1c3b
--- /dev/null
+++ b/12/Q-VĩnhTường-2006/cau2.c
@@ -0,0 +1,39 @@
+#include <stdio.h>
+#include <math.h>
+
+char prime(unsigned long long m)
+{
+	unsigned long i;
+
+	for (i = 3; i <= sqrt(m); i += 2)
+		if (m % i == 0)
+			return 0;
+
+	return 1;
+}
+
+int main()
+{
+	unsigned long long n, i;
+
+	scanf("%lld", &n);
+
+	if (n == 1) {
+		puts("2");
+
+		return 0;
+	}
+
+	i = (n % 2) ? n : n - 1;
+
+	while (i <= 18446744073709551615ULL) {
+		i += 2;
+
+		if (!prime(i))
+			continue;
+
+		printf("%lld\n", i);
+
+		return 0;
+	}
+}
diff --git a/12/Q-VĩnhTường-2006/cau3.c b/12/Q-VĩnhTường-2006/cau3.c
new file mode 100644
index 0000000..136f154
--- /dev/null
+++ b/12/Q-VĩnhTường-2006/cau3.c
@@ -0,0 +1,40 @@
+#include <stdio.h>
+#include <math.h>
+
+const char PRIMES[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31};
+
+int main()
+{
+	char i;
+	short n, n0;
+
+	scanf("%hd", &n);
+
+	if (n < 2) {
+		printf("\n%hd\n", n);
+
+		return 0;
+	}
+
+	n0 = n;
+
+	for (i = 0; i < 11; i++)
+		while (n0 % PRIMES[i] == 0) {
+			n0 /= PRIMES[i];
+			printf("%hd ", PRIMES[i]);
+		}
+
+	if (n0 - 1)
+		printf("%hd\n", n0);
+	else
+		putchar(10);
+
+	n0 = pow(2, (int) log2(n) - 1);
+
+	if (n0 * 3 > n)
+		printf("%hd\n", n0 * 2);
+	else
+		printf("%hd %hd\n", n0 * 2, n0 * 3);
+
+	return 0;
+}
diff --git a/12/Q-VĩnhTường-2006/cau4.c b/12/Q-VĩnhTường-2006/cau4.c
new file mode 100644
index 0000000..d971927
--- /dev/null
+++ b/12/Q-VĩnhTường-2006/cau4.c
@@ -0,0 +1,26 @@
+#include <stdio.h>
+#include <string.h>
+
+int main()
+{
+	char n, count = 0, s[21], c, i;
+	unsigned long long m;
+
+	for (n = 1; n < 20 && scanf("%lld", &m) != EOF; n++) {
+		if (m < 10)
+			continue;
+
+		sprintf(s, "%lld", m);
+		c = s[0];
+
+		for (i = 1; i < strlen(s) && c; i++)
+			c = (c > s[i]) ? 0 : s[i];
+
+		if (c)
+			count++;
+	}
+
+	printf("%hhd\n", count);
+
+	return 0;
+}
diff --git a/12/TP-2008/R1/.BL4.pas.swp b/12/TP-2008/R1/.BL4.pas.swp
deleted file mode 100755
index 013c8d2..0000000
--- a/12/TP-2008/R1/.BL4.pas.swp
+++ /dev/null
Binary files differdiff --git a/12/TP-2008/R2/.DG.pas.swp b/12/TP-2008/R2/.DG.pas.swp
deleted file mode 100644
index 7227844..0000000
--- a/12/TP-2008/R2/.DG.pas.swp
+++ /dev/null
Binary files differdiff --git a/12/TP-2008/R1/BL1.PAS b/12/TP-HN-2008/R1/BL1.PAS
index 6931b1b..6931b1b 100755
--- a/12/TP-2008/R1/BL1.PAS
+++ b/12/TP-HN-2008/R1/BL1.PAS
diff --git a/12/TP-2008/R1/BL2.PAS b/12/TP-HN-2008/R1/BL2.PAS
index e228240..e228240 100755
--- a/12/TP-2008/R1/BL2.PAS
+++ b/12/TP-HN-2008/R1/BL2.PAS
diff --git a/12/TP-2008/R1/BL3.PAS b/12/TP-HN-2008/R1/BL3.PAS
index a49b4d6..a49b4d6 100755
--- a/12/TP-2008/R1/BL3.PAS
+++ b/12/TP-HN-2008/R1/BL3.PAS
diff --git a/12/TP-2008/R1/BL4.pas b/12/TP-HN-2008/R1/BL4.pas
index 94dd3ba..94dd3ba 100755
--- a/12/TP-2008/R1/BL4.pas
+++ b/12/TP-HN-2008/R1/BL4.pas
diff --git a/12/TP-2008/R1/CLB.IN b/12/TP-HN-2008/R1/CLB.IN
index 662c775..662c775 100755
--- a/12/TP-2008/R1/CLB.IN
+++ b/12/TP-HN-2008/R1/CLB.IN
diff --git a/12/TP-2008/R1/CLB.OU b/12/TP-HN-2008/R1/CLB.OU
index e69de29..e69de29 100755
--- a/12/TP-2008/R1/CLB.OU
+++ b/12/TP-HN-2008/R1/CLB.OU
diff --git a/12/TP-2008/R1/R1.DOC b/12/TP-HN-2008/R1/R1.DOC
index 5e29da2..5e29da2 100755
--- a/12/TP-2008/R1/R1.DOC
+++ b/12/TP-HN-2008/R1/R1.DOC
Binary files differdiff --git a/12/TP-2008/R2/DG b/12/TP-HN-2008/R2/DG
index ad902a1..ad902a1 100755
--- a/12/TP-2008/R2/DG
+++ b/12/TP-HN-2008/R2/DG
Binary files differdiff --git a/12/TP-2008/R2/DG.INP b/12/TP-HN-2008/R2/DG.INP
index fb3ca57..fb3ca57 100755
--- a/12/TP-2008/R2/DG.INP
+++ b/12/TP-HN-2008/R2/DG.INP
diff --git a/12/TP-2008/R2/DG.OUT b/12/TP-HN-2008/R2/DG.OUT
index c227083..c227083 100755
--- a/12/TP-2008/R2/DG.OUT
+++ b/12/TP-HN-2008/R2/DG.OUT
diff --git a/12/TP-2008/R2/DG.o b/12/TP-HN-2008/R2/DG.o
index cf2e3e1..cf2e3e1 100755
--- a/12/TP-2008/R2/DG.o
+++ b/12/TP-HN-2008/R2/DG.o
Binary files differdiff --git a/12/TP-2008/R2/DG.pas b/12/TP-HN-2008/R2/DG.pas
index 2313685..2313685 100755
--- a/12/TP-2008/R2/DG.pas
+++ b/12/TP-HN-2008/R2/DG.pas
diff --git a/12/TP-2008/R2/HC.pas b/12/TP-HN-2008/R2/HC.pas
index 8e6b182..8e6b182 100644
--- a/12/TP-2008/R2/HC.pas
+++ b/12/TP-HN-2008/R2/HC.pas
diff --git a/12/TP-2008/R2/R2.doc b/12/TP-HN-2008/R2/R2.doc
index c804058..c804058 100755
--- a/12/TP-2008/R2/R2.doc
+++ b/12/TP-HN-2008/R2/R2.doc
Binary files differdiff --git a/12/TP-2008/R2/TBC.PAS b/12/TP-HN-2008/R2/TBC.PAS
index 1a26a91..1a26a91 100755
--- a/12/TP-2008/R2/TBC.PAS
+++ b/12/TP-HN-2008/R2/TBC.PAS
diff --git a/12/TP-2009/R1/BTN.PAS b/12/TP-HN-2009/R1/BTN.PAS
index dbb022d..dbb022d 100755
--- a/12/TP-2009/R1/BTN.PAS
+++ b/12/TP-HN-2009/R1/BTN.PAS
diff --git a/12/TP-2009/R1/HEXA.PAS b/12/TP-HN-2009/R1/HEXA.PAS
index a2fd6ca..a2fd6ca 100755
--- a/12/TP-2009/R1/HEXA.PAS
+++ b/12/TP-HN-2009/R1/HEXA.PAS
diff --git a/12/TP-2009/R1/PS.PAS b/12/TP-HN-2009/R1/PS.PAS
index 6cf2d09..6cf2d09 100755
--- a/12/TP-2009/R1/PS.PAS
+++ b/12/TP-HN-2009/R1/PS.PAS
diff --git a/12/TP-2009/R1/R1.pdf b/12/TP-HN-2009/R1/R1.pdf
index b0834b3..b0834b3 100755
--- a/12/TP-2009/R1/R1.pdf
+++ b/12/TP-HN-2009/R1/R1.pdf
Binary files differdiff --git a/12/TP-2009/R2/BAI1.PAS b/12/TP-HN-2009/R2/BAI1.PAS
index b28ae0b..b28ae0b 100755
--- a/12/TP-2009/R2/BAI1.PAS
+++ b/12/TP-HN-2009/R2/BAI1.PAS
diff --git a/12/TP-2009/R2/BAI3.PAS b/12/TP-HN-2009/R2/BAI3.PAS
index 30eecdf..30eecdf 100755
--- a/12/TP-2009/R2/BAI3.PAS
+++ b/12/TP-HN-2009/R2/BAI3.PAS
diff --git a/12/TP-2009/R2/R2.pdf b/12/TP-HN-2009/R2/R2.pdf
index 7af542a..7af542a 100755
--- a/12/TP-2009/R2/R2.pdf
+++ b/12/TP-HN-2009/R2/R2.pdf
Binary files differdiff --git a/12/TP-2010/BAI1.PAS b/12/TP-HN-2010/BAI1.PAS
index 029201d..029201d 100755
--- a/12/TP-2010/BAI1.PAS
+++ b/12/TP-HN-2010/BAI1.PAS
diff --git a/12/TP-2010/BAI2.PAS b/12/TP-HN-2010/BAI2.PAS
index d6639df..d6639df 100755
--- a/12/TP-2010/BAI2.PAS
+++ b/12/TP-HN-2010/BAI2.PAS
diff --git a/12/TP-2010/BAI3 b/12/TP-HN-2010/BAI3
index 7b83e7b..7b83e7b 100755
--- a/12/TP-2010/BAI3
+++ b/12/TP-HN-2010/BAI3
Binary files differdiff --git a/12/TP-2010/BAI3.INP b/12/TP-HN-2010/BAI3.INP
index 3609812..3609812 100755
--- a/12/TP-2010/BAI3.INP
+++ b/12/TP-HN-2010/BAI3.INP
diff --git a/12/TP-2010/BAI3.OUT b/12/TP-HN-2010/BAI3.OUT
index e69de29..e69de29 100755
--- a/12/TP-2010/BAI3.OUT
+++ b/12/TP-HN-2010/BAI3.OUT
diff --git a/12/TP-2010/BAI3.o b/12/TP-HN-2010/BAI3.o
index 7706cd6..7706cd6 100755
--- a/12/TP-2010/BAI3.o
+++ b/12/TP-HN-2010/BAI3.o
Binary files differdiff --git a/12/TP-2010/BAI3.pas b/12/TP-HN-2010/BAI3.pas
index aedf9a0..aedf9a0 100755
--- a/12/TP-2010/BAI3.pas
+++ b/12/TP-HN-2010/BAI3.pas
diff --git a/12/TP-2010/README.md b/12/TP-HN-2010/README.md
index 625312d..625312d 100644
--- a/12/TP-2010/README.md
+++ b/12/TP-HN-2010/README.md
diff --git a/12/TP-2010/TP-2010.png b/12/TP-HN-2010/TP-2010.png
index 7eacc66..7eacc66 100755
--- a/12/TP-2010/TP-2010.png
+++ b/12/TP-HN-2010/TP-2010.png
Binary files differdiff --git a/12/TP-2010/_BAI3.pas b/12/TP-HN-2010/_BAI3.pas
index 09ec0ca..09ec0ca 100644
--- a/12/TP-2010/_BAI3.pas
+++ b/12/TP-HN-2010/_BAI3.pas