#2359. 皮配

    ID: 2359 传统题 1000ms 256MiB 尝试: 0 已通过: 0 难度: NOI/NOI+/CTS 上传者: 标签>PROV赛事:contest402来源:qoj.ac数据:公开样例排序字符串

皮配

皮配

题目描述

皮配 - Problem - QOJ.ac

Login

Register

QOJ.ac

QOJ

[QOJ](//qoj.ac)

Contests

Category

Problems

Submissions

Hack!

Blogs

Day 1

		Time Limit:			3 s		
			Memory Limit:			512 MB		
			Total points:			100		

				2019 十二省联合省队选拔 Day 2				

		A.
		皮配		

	



[
	Statistics	](/contest/402/problem/2998/statistics)





	[
		Statement		](#tab-statement)

			

[ Languages](#)


	[Default](/contest/402/problem/2998/statement/default)
	

							[English](/contest/402/problem/2998/statement/en)

Submit

Custom Test

Attachments

Discussions & Issues 1

Back to the contest

Submit

Run

Editorials

IDTypeStatusTitlePosted ByLast UpdatedActions

EditorialOpen** Official Editorial**Qingyu- Download

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0

No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.

Do not submit duplicated issues.

Issues must be filed in English or Chinese only.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.

					 English					
				

				[العربية](//qoj.ac/contest/402/problem/2998?locale=ar)
					[English](//qoj.ac/contest/402/problem/2998?locale=en)
					[Español](//qoj.ac/contest/402/problem/2998?locale=es)
					[Français](//qoj.ac/contest/402/problem/2998?locale=fr)
					[日本語](//qoj.ac/contest/402/problem/2998?locale=ja)
					[한국어](//qoj.ac/contest/402/problem/2998?locale=ko)
						[Türkçe](//qoj.ac/contest/402/problem/2998?locale=tr)
						[简体中文](//qoj.ac/contest/402/problem/2998?locale=zh-cn)
					[繁體中文](//qoj.ac/contest/402/problem/2998?locale=zh-tw)

QOJ.ac | QOJ 4.5.49 (2019-2026)

Made with ❤️ by Qingyu✨ | Contact us: [email protected]

Server Time: 2026-11-09 07:59:09 (UTC+8)

输入格式

(见题面原文)

输出格式

(见题面原文)

数据范围

(见题面原文)

样例

样例 1

2
2 1
3 2 2 2
1 1
1 2
1
1 0
4 2
10 30 20 30
1 6
2 4
1 7
2 4
2
2 3
3 1
1
22

样例 2

1
30 20
497 500 500 500
12 10
16 6
11 10
5 10
10 10
4 9
10 10
1 10
14 10
3 10
6 10
9 10
5 10
19 10
9 10
7 10
14 10
6 10
7 10
10 8
19 10
12 10
11 10
1 6
12 10
13 10
20 10
16 10
19 10
14 10
10
8 2
23 1
14 3
21 2
2 3
20 0
13 0
27 1
22 1
7 1
419427950