描述
近年来,国内电视剧吸引了越来越多的关注;有的以当红的演员阵容而吸引观众,比如《三生三世十里桃花》(Life After Life,Blooms Over Blooms);有的以贴近时代的剧情而备受关注,比如《人民的名义》(In the Name of People);有的则以精湛的演技赢得观众的喜欢,比如《大明王朝:1566》(Ming Dynasty: 1566)。
你的任务是根据电视剧的不同属性(演员、剧情和演技)对电视剧进行排行。#include<iostream> #include<cstring> #include<list> #include<algorithm> using namespace std; class TV_Drama{ public: char name[100]; int actor; int story; int acting_skill;// 在此处补充你的代码int main(){ list<TV_Drama> lst; int n; cin>>n; char _name[100]; int _actor, _story, _acting_skill; for (int i=0; i<n; i++){ cin.ignore(); cin.getline(_name,100); cin>>_actor>>_story>>_acting_skill; lst.push_back(TV_Drama(_name, _actor, _story, _acting_skill)); } lst.sort(); for_each(lst
013:编程填空:三生三世
最新推荐文章于 2024-07-24 08:30:00 发布