1221. 值班

YZAZJL

include

include

include

using namespace std;

int main()
{
int n;
cin >> n;
int i;
int a[n * 30];
int j = 0;
int tmp;
for(i = 0; i < n; i++){
while(cin >> tmp){
if(tmp != -1){
a[j] = tmp;
j++;
}
if(tmp == -1){
break;
}
}
}
sort(a, a + j);
int cnt = unique(a, a + j) - a;
if(cnt == 30){
cout << “yes” << endl;
}else{
cout << “no” << endl;
}
return 0;
}

你当前正在回复 博客/题目
存在问题!