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 fin("pachete_multe.in"); | |
ofstream fout("pachete_multe.out"); | |
//Strategie 1 O(N^2) | |
//Cat timp sirul nu e completat 1,2,...n | |
//1)Iau elementul curent, il mut intr-o casuta goala (n+1) | |
//2)Iau acel sir[j] pa_int care sir[j] == pozitie_curent index |
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 fin("pachete_multe.in"); | |
ofstream fout("pachete_multe.out"); | |
//Strategie 1 O(N^2) | |
//Cat timp sirul nu e completat 1,2,...n | |
//1)Iau elementul curent, il mut intr-o casuta goala (n+1) | |
//2)Iau acel sir[j] pa_int care sir[j] == pozitie_curent index |