RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
COCI00596

Ljeto

Unrated 레이팅 미적용
난이도
1s
시간 제한
512MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

Bruno and his friends are playing with water guns. They are passionate gamers,
which is why this is not a regular water gun game, but is in fact very similar to
vid\(eo-ga\)mes. They even hired a moderator for the game.
At the beginning of the game, the players are divided into two teams: pineapples
and blueberries. During the game, the moderator keeps track of every time some
player sprays some other player, writing down the time when it happened. Just like in vid\(eo-ga\)mes, the
players acquire points. When a player from some team sprays someone from the opposing team, their
team receives 100 points. However, if within 10 seconds the same player again sprays someone from the
opposing team, this is counted as a doub\(le-sp\)ray and their team receives an additional 50 points. A player
can achieve multiple doub\(le-sp\)rays in a row, each worth an additional 50 points for their team.

제약

Subtask 1 (10 points): \(1 \le n \le 3\)

Subtask 2 (15 points): No doub\(le-sp\)rays occcur.

Subtask 3 (25 points): No additional constrains.

입력 형식

The first line contains the integer \(n\) (\(1 \le n \le 100\)), the number of sprays that happened during the game.
Each of the following \(n\) lines contains three integers \(t@@RISE_MATH_BLOCK_0@@i\), \(b@@RISE_MATH_BLOCK_1@@i \le 1000\), \(1 \le a@@RISE_MATH_BLOCK_2@@i\) sprayed player \(b@@RISE_MATH_BLOCK_3@@i\) (in seconds).
Labels of the players from team pineapple are positive integers from 1 to 4, while the labels of the players
from team blueberry are the positive integers from 5 to 8. The players \(a@@RISE_MATH_BLOCK_4@@i\) are guranteed to be from
different teams.
The numbers \(t\)\(i\) are distinct and are ordered increasingly.

출력 형식

The first and only line should contain two numbers: the total score of team pineapple and the total score
of team blueberry.

서브태스크
서브태스크점수설명

1

10점

\(1 \le n \le 3\)

2

15점

No doub\(le-sp\)rays occcur.

3

25점

No additional constrains.

예제 1
입력
3
10 1 6
20 1 7
21 8 1
출력
250 100
예제 2
입력
3
10 2 5
15 2 6
25 2 5
출력
400 0
예제 3
입력
2
10 5 2
11 6 3
출력
0 200
설명

Clarification of the first example:
At seconds 10 and 20, player 1 sprayed players 6 and 7 from the other team. For each spraying the

pineapples received 100 points. As the sprays happened within 10 seconds, the team receieved an additional
50 poitns (250 = 2 · 100 + 50). Team blueberries sprayed only one player from the opposing team, which
is why they received only 100 points.
Clarification of the second example:
Player 2 achieved two double-sprays in a row, which is why team pineapple got a total of 3·100+2·50 = 400
points.

문제 정보

생성자가 기록되지 않았습니다.

출처 COCI 2021/2022 Contest 1

평가 및 의견

Ljeto

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 50 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

Ljeto

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8