QOJ.ac

QOJ

时间限制: 1 s 内存限制: 512 MB 总分: 100

#6354. 4

统计

我本可以让你计算反 $K_4$ 子图的数量,但这不过是解决这个问题并抄袭 GP of Nanjing 2021 中的 K 题(https://codeforces.com/gym/103470/problem/K)(ecnerwala 的题解见 https://codeforces.com/blog/entry/97762?#comment-866645),我为什么要这么做呢?

给定一个简单无向图。计算其 $K_4$ 子图的数量(即图中存在 4 个顶点,且这 4 个顶点之间两两相连,共有 6 条边)。

一个简单图。$4 \le n \le 100\,000$,$0 \le m \le 100\,000$。保证没有自环或重边。

本题使用标准校验器。

样例

输入格式 1

5 9
1 2
1 3
1 4
1 5
2 3
2 4
2 5
3 4
3 5

输出格式 1

2

输入格式 2

4 0

输出格式 2

0

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:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. 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.