0% found this document useful (0 votes)
26 views6 pages

Bac Informatica 2014

This document contains information about the 2014 Romanian national baccalaureate exam, including exam subjects and sample questions/problems. Subject I includes problems on prime factorization, finding the greatest common divisor of two numbers algorithmically, and properties of graphs. Subject II includes problems on time intervals, permutations, and matrix manipulation. Subject III includes recursive functions, color combinations, and calculating interval bounds mathematically.

Uploaded by

DianaUngureanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views6 pages

Bac Informatica 2014

This document contains information about the 2014 Romanian national baccalaureate exam, including exam subjects and sample questions/problems. Subject I includes problems on prime factorization, finding the greatest common divisor of two numbers algorithmically, and properties of graphs. Subject II includes problems on time intervals, permutations, and matrix manipulation. Subject III includes recursive functions, color combinations, and calculating interval bounds mathematically.

Uploaded by

DianaUngureanu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Examenul de bacalaureat naţional 2014

SUBIECTUL I
1.c;
2. a) 2 7 1

n d p
2352 2 1
1176 2 2
588 2 3
294 2 4
147 3 1
49 4 0
49 5 0
49 6 0
49 7 1
7 7 2
1

b) 25 si 50;
c) citeste n
(numar natural nenul)
pentru d<-2,n executa
p<-0
cat timp n%d=0 executa
p<-p+1
n<-[n/d]
daca p%2=0 si p≠0 atunci
scrie d, ’ ’
d<-d+1

scrie n

d) #include<iostream>

using namespace std;

unsigned int n,d,p;

int main()
{cin>>n;

d=2;

while(d<=n)

{ p=0;

while(n%d==0)

{ p=p+1; n=n/d;}

if(p%2==0&&p!=0)

{cout<<d<<” ”; }

d=d+1;

cout<<n;
return 0;
}

SUBIECTUL AL II-LEA
1.c);
Nod 1: grad intern:0
grad extern:2
Nod 2: grad intern:0
grad extern:0
Nod 3: grad intern:2
grad extern:2
Nod 4: grad intern:0
grad extern:2
Nod 5: grad intern:3
grad extern:0
Nod 6: grad intern:0
grad extern:4
Nod 7: grad intern:4
grad extern:0
Nod 8: grad intern:1
grad extern:3

2. d;

1 b 2 d 3
0 1 2 3 4
- c -

s[2]=’a’+2=’c’;
strcpy(s,s+1)=stergere 1;
strcpy(s+3,s+4)=stergere 3;
bcd=rezultatul final;

3.
if(start.secunda<stop.secunda&&start.minut<stop.minut)
cout<<”acceptat”;
else
if(star.secunda<stop.secunda&&start.minut==stop.minut)
cout<<”acceptat;
else
cout<<”respins”;

4. 7 si 9.
5.

5 1 2 3 4
8 2 2 5 3
2 1 7 3 9
3 0 9 8 5

 A[1][4]=delete
 A[2][4]=delete
 A[3][4]=delete
 A[4][4]=delete
 A[3][1]=delete
 A[3][2]=delete
 A[3][3]=delete
 A[3][5]=delete
#include<iostream>
Citim matricea a[i][j], iar pentru a
sterge elementele de pe coloana n-1
using namespace std;
si linia m-1 trebuie sa le initializam cu
int a[51][51],m,n,i,j;
pozitiile de dinainte, adica elementul
int main() de pe pozitia a[m-1][j]=a[m][j].
{cin>>m>>n;
for(i=1;i<=m;i++) Daca A[3][1]=2 si A[4][1]=3=> A[3][1]
for(j=1;j<=n;j++) va deveni 3 s.a.m;
cin>>a[i][j]; La final vom afisa matricea cu o linie si
o coloana in minus prin for de la 1 la
m-1 si for de la 1 la n-1.

for(int i=1;i<=m;i++)
for(int j=1;j<=n;j++)
{
a[m-1][j]=a[m][j];
a[i][n-1]=a[i][n];
}
for(int i=1;i<=m-1;i++)
{
for(int j=1;j<=n-1;j++)
cout<<a[i][j]<<" ";
cout<<endl;

SUBIECTUL AL III-LEA

1. b);
f(15)=> f(13)-1=8-1=7;
f(13)=>f(11)-1=9-1=8;
f(11)=>f(9)-1=10-1=9;
f(9)=>f(10)+3=7+3=10;
f(10)=>7
2. rosu=1; 1 si 2 nu alaturate
galben=2;
roz=3;
albastru=4;
violet=5;
1,3,2,4
1,3,2,5
1,3,4,2
1,3,4,5
1,3,5,2
1,3,5,4=(rosu,roz,violet,albstru)
1,4,2,3=(rosu,albastru,galben,roz)

3.

#include <iostream>

using namespace std;


int n,a,b,i,j,p1=1,p2=1;
void interval(int n,int&a,int &b)
{ for(i=1;i<=n-1;i++)
p1=p1*i;
a=p1+1;
for(j=1;j<=n+1;j++)
p2=p2*j;
b=p2-1;

}
int main()
{cin>>n;
interval(n,a,b);
cout <<a<<" "<<b<<" "<< endl;
return 0;
}
4. #include <iostream>
using namespace std;

int a, frecv[100], i, maxi;

int main()
{
while (cin>> a)
{
while (a > 9)
{
frecv[a % 100]++;
a = a / 10;
}
}
for (i = 10; i <= 99; i++)

if (frecv[i] > maxi)


maxi = frecv[i];
for (i = 10; i <= 99; i++)

if (frecv[i] == maxi )
cout << i << " ";

return 0;
}

You might also like