Untitled
unknown
plain_text
3 years ago
447 B
8
Indexable
#include <iostream>
#include <vector>
#include <iomanip>
#include <algorithm>
using namespace std;
struct Film {
string name;
int date;
string rez;
bool operator< (const Film& other) const {
return date < other.date;
}
};
int main()
{
setlocale(LC_ALL, "Russian");
int n; cin >> n;
vector<Film> all;
for (int i = 0; i < n; i++) {
Film p;
cin >> p.name >> p.date >> p.rez;
all.push_back(p);
}
}Editor is loading...