Petya loves football very much. One day, as he was watching a football match, he was writing the players' current positions on a piece of paper. To simplify the situation he depicted it as a string consisting of zeroes and ones. A zero corresponds to players of one team; a one corresponds to players of another team. If there are at least 7 players of some team standing one after another, then the situation is considered dangerous. For example, the situation 00100110111111101 is dangerous and 11110111011101 is not. You are given the current situation. Determine whether it is dangerous or not.
彼佳非常熱愛足球。 有一天,他在看一場足球比賽時,正在一張紙上寫下球員們的當前位置。 為了簡化情況,他將其描述為由零和一組成的字符串。 零對應一支球隊的球員; 一個對應於另一支球隊的球員。 如果某支球隊至少有7名球員依次站立,則情況被認為是危險的。 例如,情況 00100110111111101 是危險的,而 11110111011101 不是。 你得到了當前的情況。 確定它是否危險。
The first input line contains a non-empty string consisting of characters "0" and "1", which represents players. The length of the string does not exceed 100 characters. There's at least one player from each team present on the field.
第一個輸入行包含一個由字符“0”和“1”組成的非空字符串,代表玩家。 字符串的長度不超過 100 個字符。 每支球隊至少有一名球員在場上。
Print "YES" if the situation is dangerous. Otherwise, print "NO".
如果情況很危險,請打印“YES”。 否則,打印“否”。
001001
NO
1000000001
YES
ID | User | Problem | Subject | Hit | Post Date |
沒有發現任何「解題報告」 |