-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1069_weibo_send.cpp
60 lines (57 loc) · 1.01 KB
/
1069_weibo_send.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#include<iostream>
#include<map>
#include<vector>
using namespace std;
int main()
{
int peo_num,first_win,space;
cin>>peo_num>>space>>first_win;
map<int,string> src;
vector<string> det;
string tmp;
for(int i=1;i<=peo_num;i++)
{
cin>>tmp;
src[i]=tmp;
}
bool flag;
int next_flag=0;
for(int i=first_win;i<=peo_num;i +=space)
{
next_flag=0;
next_time: flag = false;
if(i+next_flag>peo_num)
{
break;
}
tmp=src[i+next_flag];
for(int j=0;j<det.size();j++)
{
if(det[j]==tmp)
{
flag=true;
break;
}
}
if(flag==true)
{
next_flag++;
goto next_time;
}
else
{
det.push_back(tmp);
}
}
if(det.size()>0)
{
for(auto x:det)
{
cout<<x<<endl;
}
}
else
{
cout<<"keep going...";
}
}