Logo
(追記) (追記ここまで)

32568번 - Inconsistent Patterns 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB17131376.471%

문제

The Simpson's Paradox is a phenomenon in statistics where a trend or pattern that appears in different groups of data is inconsistent (disappears or even reverses) with what we see when the groups are combined. It is named after the British statistician Edward H. Simpson, who described it in 1951, although similar observations had been made earlier.

For example, let assume that two teams have been training for the UKIEPC 2024 and have the following statistics for the graph and geometry problems:

  • Team X has solved 81 out of 87 graph problems (success rate of approx 93%), and 192 out of 263 geometry (73%). Total is 273 out of 350 problems (78%).
  • Team Y has solved 234 out of 270 graph problems (87%), and 55 out of 80 geometry (69%). Total is 289 out of 350 (83%).

If we look per category --- team X has higher success rate in both categories, but when looking in combination, the pattern reverses, and team Y appears to have higher success rate.

In this problem you are to construct an example of the dataset illustrating the Simpson’s paradox. More specifically, let us assume (similarly to the example above) that there are two teams who have been solving problems of $N$ categories and the total number of problems solved by each of the teams is $M$. Let us denote the number of the problems in $i$-th category solved by Team X as $a_i,ドル attempted --- by $b_i$. Similarly, let us define $c_i$ as the number of problems solved by Team Y in the $i$-th category and $d_i$ as the number of problems attempted.

You are to find such $a_i,ドル $b_i,ドル $c_i$ and $d_i$ that:

  • $\sum b_i = \sum d_i = M$
  • $a_i \le b_i$ for all $i$ from 1ドル$ to $N$
  • $c_i \le d_i$ for all $i$ from 1ドル$ to $N$
  • $a_i, b_i, c_i, d_i > 0$ for all $i$ from 1ドル$ to $N$
  • $\frac{a_i}{b_i} > \frac{c_i}{d_i}$ for all $i$ from 1ドル$ to $N$
  • $\frac{\sum a_i}{\sum b_i} < \frac{\sum c_i}{\sum d_i}$

입력

Input file contains two integer numbers $N$ and $M$ (2ドル \le N \le 10000,ドル 4ドル*N \le M \le 10^5$).

출력

Output $N$ lines --- $i$-th of them should contain four positive integer numbers $a_i,ドル $b_i,ドル $c_i,ドル $d_i,ドル describing the dataset. Input data is selected in such a way that the solution exists.

제한

예제 입력 1

2 350

예제 출력 1

81 87 234 270
192 263 55 80

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2024 I번

  • 문제를 만든 사람: Fedor Tsarev
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /