This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| void sortare(int c[],double p[], int n){ | |
| for(int i=1; i<n; i++) | |
| for(int j=i+1; j<=n; j++) | |
| if(p[i]>p[j]){ | |
| swap(p[i],p[j]); | |
| swap(c[i],c[j]); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| int s1(int &n,int a[][50]){ | |
| int k=0; | |
| ifstream in ("matrice.in"); | |
| in>>n; | |
| for(int i=1; i<=n; i++) | |
| for(int j=1; j<=n; j++){ | |
| in>>a[i][j]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| void s1(int &n, int t[]){ | |
| ifstream in ("date.in"); | |
| in>>n; | |
| for(int i=1; i<=n; i++) | |
| in>>t[i]; | |
| } | |
| int s2(int k, int n, int t[]){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<iostream> | |
| #include<fstream> | |
| #include<cstring> | |
| using namespace std; | |
| ifstream in("date.in"); | |
| void S1(char *s) | |
| { | |
| in.getline(s,251); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| #include <cstring> | |
| using namespace std; | |
| char s[250],n, v[30]; | |
| void s1(char *s){ | |
| ifstream in("date.in"); | |
| in.getline(s,250); | |
| } | |
| int s2(char s[], char c){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| ifstream in ("date.in"); | |
| struct nod{ | |
| char info; | |
| nod *st, *dr; | |
| nod() : st(0), dr(0){} | |
| }; | |
| nod *r; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| ifstream in("date.in"); | |
| int n, a[50][50], viz[50],c[50]; | |
| void citire(){ | |
| int x,y; | |
| while(in>>x>>y) | |
| a[x][y]=a[y][x]=1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int n, a[50][50]; | |
| void parcurgere_lat(int x){ | |
| int c[50], viz[50],p,u,v; | |
| for(int i=1; i<=n; i++) | |
| viz[i]=0; | |
| c[1]=x; | |
| viz[x]=1; | |
| p=1; | |
| v=1; | |
| while(p<=u){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <fstream> | |
| using namespace std; | |
| ifstream f("date.in"); | |
| int n, v[50], nr[50], vi[50], vs[50], vd[50],niv[50], ni=0,k,r; | |
| void citire(){ | |
| f>>n; | |
| for(int i=1; i<=n; i++) | |
| f>>v[i]>>vd[i]>>vs[i]>>vi[i]; | |
| } |
NewerOlder