#B. [POI 2004] KAG

    Type: RemoteJudge 2000ms 125MiB

[POI 2004] KAG

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.

题目描述

输入格式

第一行一个整数 kk 表示 kk 组数据。

接下来描述每个数据开头两个数 nnmm,接下来 mm 行每行两个数表示一条边。

输出格式

输出共 kk 行,每行输出一个判定,如果该图为 c-algae 输出 TAK,否则输出 NIE

3
3 2
1 2
2 3
4 3
1 2
2 3
3 4
3 3
1 2
2 3
3 1
TAK
NIE
TAK

提示

对于 100%100\% 的数据,1k101\le k\le101n1041\le n\le10^40m1050\le m\le10^5

20250317 领军班比赛1

Not Attended
Status
Done
Rule
IOI
Problem
3
Start at
2025-3-17 14:00
End at
2025-3-17 18:00
Duration
4 hour(s)
Host
Partic.
9