高维偏序问题
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Background
你需要解决一个高维偏序问题。
Description
一个二维数组的偏序问题,指的就是求所有满足如下条件的数对的个数:
- ,其中
其中,保证任意~是一个~的排列。
Format
Input
第一行SubTask编号∈{0,1,2,3}(意义见Limitation);
第二行两个数字N,K,意义同题目描述;
接下来K行,每行N个数字,表示了这个二维数组。
Output
一行一个整数,表示题目描述所求偏序的答案。
(提示:答案不超过)
Samples
3
5 3
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
10
Limitation
空间限制:256MB
对于每个25分的SubTask,你需要处理不同的数据:
SubTask 0:N=3000000,K=1,1500毫秒
SubTask 1:N=500000,K=2,1500毫秒
SubTask 2:N=20000,K=100,5000毫秒
SubTask 3:N=60000,K=12,5000毫秒
2023年中国科学院大学第一届“果萌杯”程序设计大赛(热身)
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 6
- Start at
- 2023-8-2 12:00
- End at
- 2023-8-6 17:00
- Duration
- 101 hour(s)
- Host
- Partic.
- 78