Hệ sinh thái số IELP
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.

Hệ sinh thái số IELP

Học lập trình với Hệ sinh thái số IELP
 
Trang ChínhTrang Chính  CalendarCalendar  Latest imagesLatest images  Trợ giúpTrợ giúp  Tìm kiếmTìm kiếm  Thành viênThành viên  NhómNhóm  Đăng kýĐăng ký  Đăng NhậpĐăng Nhập  
Tìm kiếm
 
 

Display results as :
 
Rechercher Advanced Search
Keywords
Nhàn Hoàng wavio Minh nhật Thành 2022 đặng pháp nguyễn điểm phương BANG chứa sach được Phần thưởng tổng tích sinh giác Trần hình HOAI Phạm
Latest topics
» Buổi học số 1. Cấu trúc tuần tự trong C++ (Bài 1 -> Bài 15)
sach - Sạch Thùy Trâm EmptyThu Apr 25, 2024 10:49 am by quanle1120

» Chấm bài trực tuyến với Jusolan.ddns.net
sach - Sạch Thùy Trâm EmptyWed Apr 24, 2024 9:15 pm by Admin

» Bài kiểm tra giữa Học kỳ II
sach - Sạch Thùy Trâm EmptyWed Apr 05, 2023 8:00 am by Nguyễn Đức Mạnh

» Bài giữa kì 2
sach - Sạch Thùy Trâm EmptyMon Apr 03, 2023 8:34 am by Khách viếng thăm

» Bài giữa kì tin Lê Đức Anh
sach - Sạch Thùy Trâm EmptySun Apr 02, 2023 8:33 pm by Tendalda06

» Nghiêm Tuấn Tú
sach - Sạch Thùy Trâm EmptySat Apr 01, 2023 9:03 am by Nghiêm Tuấn Tú

» Nguyễn Trần Ý Nhi
sach - Sạch Thùy Trâm EmptySat Apr 01, 2023 8:23 am by Nguyễn Trần Ý Nhi

» Nguyễn Kim Anh
sach - Sạch Thùy Trâm EmptySat Apr 01, 2023 12:05 am by Khách viếng thăm

» Trần Thanh Trà
sach - Sạch Thùy Trâm EmptyFri Mar 31, 2023 11:10 pm by Trần Thanh Trà

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  
CalendarCalendar
Top posting users this week
No user

Gửi bài mới   Trả lời chủ đề này
 

 Sạch Thùy Trâm

Go down 
2 posters
Tác giảThông điệp
Admin
Admin



Tổng số bài gửi : 152
Join date : 23/04/2022
Age : 41
Đến từ : THPT Chuyên Nguyễn Tất Thành - Yên Bái

sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Sạch Thùy Trâm   sach - Sạch Thùy Trâm EmptyMon Sep 12, 2022 9:42 pm

rabbit rabbit bounce bounce
Về Đầu Trang Go down
https://ielp.forumvi.com
Sạch Thuỳ Trâm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 11:ARR2HVS1   sach - Sạch Thùy Trâm EmptyWed Sep 14, 2022 3:13 pm

program ct;
uses math;
var m,n,s:longint;
   A,ss:array [-5..300,-5..300] of longint;
procedure doc;
var i,j:longint;
begin
       assign(input,'ARR2HVS1.inp');
       assign(output,'ARR2HVS1.out');
       reset(input);
       rewrite(output);
               readln(m,n,s);
                       for i:=1 to m do
                       for j:=1 to n do
                               read(a[i,j]);
end;
function tong(x,x1,y,y1:longint):longint;
var xy,yx:longint;
   s1:int64;
begin
       s1:=0;
       for xy:=x to x1 do
       for yx:=y to y1 do
               s1:=s1+A[xy,yx];
               exit(s1);
end;
procedure xl;
var i,p,k,x1,y1,tam,vc:longint;
begin
       p:=0;
       tam:=0;
       if m<n then vc:=m else vc:=n;
       for k:=1 to vc do
       begin
       tam:=0;
       for x1:=1 to m do
       for y1:=1 to n do
               begin
                       tam:=tong(x1,x1+k-1,y1,y1+k-1);
                               if tam=s then
                               begin
                                       writeln(x1,#32,y1,#32,k);
                                       p:=1;
                               end;
               end;
       end;
               if p=0 then write('-1');
end;
begin
       doc;
       xl;
       close(input);
       close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 1:SDIV   sach - Sạch Thùy Trâm EmptyWed Sep 14, 2022 3:22 pm

uses math;
var n,i:longint;
const fi='SDIV.INP';
     fo='SDIV.OUT';
procedure nhap;
begin
       assign(input,fi);reset(input);
       assign(output,fo);rewrite(output);
       readln(n);
       close(input);
end;
function UOC(u:longint):int64;
var res:int64=0;
begin
       for i:=1 to trunc(sqrt(u)) do
          if u mod i=0 then
          begin
               res:=res+i;
               if i<> u div i then
                       res:=res+u div i;
          end;
          exit(res);
end;
begin
       nhap;
       write(UOC(n));
       close(output);
end.
Về Đầu Trang Go down
vũ văn xuânn




Tổng số bài gửi : 8
Join date : 13/09/2022

sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Re: Sạch Thùy Trâm   sach - Sạch Thùy Trâm EmptyWed Sep 14, 2022 3:48 pm

uses math;
var
A,s : array [-1..300,-1..300] of longint;
ii,jj,res,i,n,m,j,p,x : longint;
t,dt : int64;
const
fi = 'ARR2REC1.inp';
fo = 'ARR2REC1.out';
procedure doc;
begin
assign(input,fi); reset(input);
assign(output,fo); rewrite(output);
readln(m,n);
for i := 1 to m do
for j := 1 to n do
begin
read(a[i,j]);
s[i,j] := s[i-1,j] + s[i,j-1] - s[i-1,j-1] + a[i,j];
end;
end;
begin
doc;
p := 0; res := -trunc(1e9);
for i := 1 to m do
for j := 1 to n do
for ii := i to m do
for jj := j to n do
begin
t := s[ii,jj] - s[i-1,jj] - s[ii,j-1] + s[i-1,j-1];
dt := (ii-i+1)*(jj-j+1);
if t = dt then
begin
res := max(res,dt);
p := 1;
end;
end;
if p = 0 then write(-1);
write(res);
close(input);
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 2:LASTNUM   sach - Sạch Thùy Trâm EmptyWed Sep 14, 2022 8:31 pm

uses math;
var i,n,a:longint;
p:int64=0;
const fi='LASTNUM.INP';
fo='LASTNUM.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
read(a,N);
close(input);
end;
procedure xl;
begin
p:=1;
for i:=1 to n do
p:=(p*a) mod 10;
write(p);
end;
begin
nhap;
xl;
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 3:NUMBERC   sach - Sạch Thùy Trâm EmptyWed Sep 14, 2022 8:43 pm

uses math;
var n:int64;
procedure nhap;
begin
assign(input,'NUMBERC.INP');reset(input);
assign(output,'NUMBERC.OUT');rewrite(output);
readln(n)
end;
function NT(u:int64):boolean;
var i:longint;
begin
if (u<1) then exit(false);
if (u=2) or (u=3) then exit(true);
for i:=2 to trunc(sqrt(u)) do
if u mod i=0 then exit(false);
exit(true);
end;
begin
nhap;
while n div 10>0 do
begin
n:=n div 10;
if NT(n) then
begin
write(n);
exit;
end;
end;
write(-1);
close(input);
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 4:TSNT   sach - Sạch Thùy Trâm EmptyWed Sep 14, 2022 8:46 pm

uses math;
var n,k,i:longint;
c:array[-5..100007] of longint;
const fi='TSNT.INP';
fo='TSNT.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
read(n);
close(input);
end;
procedure phantich(u:longint);
var i:longint;
begin
i:=2;
while i*i<=u do
if u mod i=0 then
begin
inc(k);
c[k]:=i;
u:=u div i;
end else
inc(i);
if u>1 then
begin
inc(k);
c[k]:=u;
end;
end;
begin
nhap;
k:=0;
phantich(n);
for i:=1 to k do
write(c[i],#32);
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 5:ARR2DPRI   sach - Sạch Thùy Trâm EmptyWed Sep 14, 2022 9:06 pm

uses math;
var i,j,n,m:longint;
a:array[-3..300,-3..300] of longint;
const fi='ARR2DPRI.INP';
fo='ARR2DPRI.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(m,n);
for i:=1 to m do
for j:=1 to n do
read(a[i,j]);
close(input);
end;
function NT(u:longint):boolean;
var i:longint;
begin
if (u<2) then exit(false);
if (u=2) or (u=3) then exit(true);
for i:=2 to trunc(sqrt(u)) do
if u mod i=0 then exit(false);
exit(true);
end;
procedure xl;
var p:longint;
begin
p:=0;
for i:=1 to m do
for j:=1 to n do
begin
if NT(a[i,j]) then
begin
p:=1;
writeln(i,#32,j);
end;
end;
if p=0 then write(-1);
end;
begin
nhap;
xl;
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 6: ERATOS   sach - Sạch Thùy Trâm EmptyThu Sep 15, 2022 7:39 am

uses math;
var n,i:longint;
f:array[-5..100007] of boolean;
const fi='ERATOS.INP';
fo='ERATOS.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(n);
close(input);
end;
procedure sang(u:longint);
var i,k:longint;
begin
for i:=1 to u do
f[i]:=true;
f[1]:=false;
for i:=2 to trunc(sqrt(u)) do
if f[i] then
begin
k:=2;
while i*k<=u do
begin
f[i*k]:=false;
inc(k);
end;
end;
end;
begin
nhap;
sang(n);
for i:=1 to n do
if f[i] then write(i,#32);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 7:FPRIME   sach - Sạch Thùy Trâm EmptyThu Sep 15, 2022 2:23 pm

uses math;
var p,i:longint;
f:array[-5..100007] of longint;
const fi='FPRIME.INP';
fo='FPRIME.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(p);
close(input);
end;
function NT(u:longint):boolean;
var j:longint;
begin
if u<2 then exit(false);
if (u=2) or (u=3) then exit(true);
for j:=2 to trunc(sqrt(u)) do
if u mod j=0 then exit(false);
exit(true);
end;
procedure xl;
var res:longint;
begin
res:=0;
f[1]:=1;
f[2]:=1;
i:=2;
while (f[i]<=p) do
begin
if NT(f[i]) then inc(res);
inc(i);
f[i]:=f[i-1]+f[i-2];
end;
write(res);
end;
begin
nhap;
xl;
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 8:PSECOND   sach - Sạch Thùy Trâm EmptyThu Sep 15, 2022 2:50 pm

uses math;
var n,i,rmin,rmax:longint;
a:array[-5..100007] of longint;
const fi='PSECOND.INP';
fo='PSECOND.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(n);
rmin:=trunc(1e9);
rmax:=-trunc(1e9);
for i:=1 to n do
begin
read(a[i]);
rmin:=min(rmin,a[i]);
rmax:=max(rmax,a[i]);
end;
close(input);
end;
procedure xl;
begin
if rmin=rmax then
begin
write(-1);
exit;
end;
for i:=1 to n do
if (a[i]<=rmax) and (a[i]>rmin) then rmax:=a[i];
for i:=1 to n do
if a[i]=rmax then
write(rmax,#32,i);
end;
begin
nhap;
xl;
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 9:TSNT   sach - Sạch Thùy Trâm EmptyThu Sep 15, 2022 7:19 pm

uses math;
var n,k,i:longint;
c:array[-5..100007] of longint;
const fi='TSNT.INP';
fo='TSNT.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
read(n);
close(input);
end;
procedure phantich(u:longint);
var i:longint;
begin
i:=2;
while i*i<=u do
if u mod i=0 then
begin
inc(k);
c[k]:=i;
u:=u div i;
end else
inc(i);
if u>1 then
begin
inc(k);
c[k]:=u;
end;
end;
begin
nhap;
k:=0;
phantich(n);
for i:=1 to k do
write(c[i],#32);
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 12:EMERALD   sach - Sạch Thùy Trâm EmptySun Sep 18, 2022 9:23 am

uses math;
var n,i,res,s:longint;
a,b,d:array[-5..100007] of longint;
const fi='EMERALD.INP';
fo='EMERALD.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(n);
s:=0;
for i:=1 to n do
begin
read(a[i]);
s:=s+a[i];
end;
end;
procedure xl;
var s1,dem:longint;
begin
s1:=0;
dem:=0;
for i:=1 to n do
if b[i]=1 then
begin
s1:=s1+a[i];
inc(dem);
if s1*3>s then exit();
end;
if s1*3=s then
begin
res:=dem;
for i:=1 to n do
d[i]:=b[i];
end;
end;
procedure thu(i:longint);
var j:longint;
begin
for j:=0 to 1 do
begin
b[i]:=j;
if i=n then xl
else
thu(i+1);
end;
end;
begin
nhap;
res:=0;
thu(1);
if res=0 then write(0)
else
begin
write(res);
writeln;
for i:=1 to n do
if d[i]=1 then
write(i,#32);
end;
close(input);
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: BÀi 13:MODM   sach - Sạch Thùy Trâm EmptySun Sep 18, 2022 9:24 am

uses math;
var i,n,m,res:longint;
a,b,c,d:array[-5..100007] of longint;
const fi='MODM.INP';
fo='MODM.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(n,m);
for i:=1 to n do
read(a[i]);
end;
procedure xl;
var j,k:longint;
begin
k:=0;
for i:=1 to n do
if b[i]=1 then
begin
inc(k);
c[k]:=a[i];
end;
for i:=1 to k-1 do
for j:=i+1 to k do
if (c[i]+c[j]) mod m=0 then exit();
if res<k then
begin
res:=k;
for i:=1 to n do
d[i]:=b[i];
end;
end;
procedure thu(i:longint);
var j:longint;
begin
for j:=0 to 1 do
begin
b[i]:=j;
if i=n then xl
else
thu(i+1);
end;
end;
begin
nhap;
thu(1);
write(res);
writeln;
for i:=1 to n do
if d[i]=1 then
write(i,#32);
close(input);
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 14:FINANCIAL   sach - Sạch Thùy Trâm EmptySun Sep 18, 2022 9:25 am

uses math;
var i,n,k,res:longint;
a,b,c,d:array[-5..100007] of longint;
const fi='FINANCIAL.INP';
fo='FINANCIAL.OUT';
procedure nhap;
var i:longint;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(n,k);
for i:=1 to n do
read(a[i]);
end;
procedure xl;
var j,k1:longint;
begin
k1:=0;
for i:=1 to n do
if b[i]=1 then
begin
inc(k1);
c[k1]:=a[i];
end;
for i:=1 to k1-1 do
if abs(c[i]-c[i+1])<k then exit();
if res<k1 then
begin
res:=k1;
for i:=1 to k1 do
d[i]:=c[i];
end;
end;
procedure thu(i:longint);
var j:longint;
begin
for j:=0 to 1 do
begin
b[i]:=j;
if i=n then xl
else
thu(i+1);
end;
end;
begin
nhap;
res:=0;;
thu(1);
writeln(res);
for i:=1 to res do
write(d[i],#32);
close(input);
close(output);
end.
Về Đầu Trang Go down
Tr ÂM
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Bài 15:BINARY   sach - Sạch Thùy Trâm EmptySun Sep 18, 2022 9:53 am

uses math;
var s:string;
res,n:longint;
b:array[0..20] of char;
const fi='BINARY.INP';
fo='BINARY.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(n);
readln(s);
end;
function dem(u,v:string):longint;
var t:longint;
begin
t:=0;
while pos(u,v)>0 do
begin
inc(t);
delete(v,1,pos(u,v));
end;
exit(t);
end;
procedure xl;
var s2:string;
i:longint;
begin
s2:='';
for i:=1 to n do
s2:=s2+b[i];
if dem(s,s2)=1 then
res:=(res+1) mod 1000000007;
end;
procedure thu(i:longint);
var j:char;
begin
for j:='0' to '1' do
begin
b[i]:=j;
if i=n then xl
else
thu(i+1);
end;
end;

begin
nhap;
thu(1);
write(res);
close(input);
close(output);
end.
Về Đầu Trang Go down
Tr Âm
Khách viếng thăm




sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: bài 16:DQCKN1   sach - Sạch Thùy Trâm EmptySun Sep 18, 2022 10:17 am

uses math;
var i,n,k:longint;
a,b:array[-5..100007] of longint;
const fi='DQCKN1.INP';
fo='DQCKN1.OUT';
procedure nhap;
begin
assign(input,fi);reset(input);
assign(output,fo);rewrite(output);
readln(n,k);
close(input);
end;
procedure xl;
var i:longint;
begin
for i:=1 to k do
write(b[i],#32);
writeln;
end;
procedure thu(i:longint);
var j:longint;
begin
for j:=(b[i-1]+1) to (n-k+i) do
begin
b[i]:=j;
if i=k then xl
else
thu(i+1);
end;
end;
begin
nhap;
b[0]:=0;
thu(1);
close(output);
end.
Về Đầu Trang Go down
Sponsored content





sach - Sạch Thùy Trâm Empty
Bài gửiTiêu đề: Re: Sạch Thùy Trâm   sach - Sạch Thùy Trâm Empty

Về Đầu Trang Go down
 
Sạch Thùy Trâm
Về Đầu Trang 
Trang 1 trong tổng số 1 trang
 Similar topics
-
» Nguyễn Ngọc Trâm Anh
» Bài 2 sách giáo khoa
» Bài 3 sách giáo khoa
» Nguyễn Ngọc Trâm Anh
» Bùi thu thuỷ bài 6

Permissions in this forum:Bạn được quyền trả lời bài viết
Hệ sinh thái số IELP :: Thực nghiệm phần C++ :: 5-Lập trình nâng cao-
Gửi bài mới   Trả lời chủ đề nàyChuyển đến