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

10418번 - Yet Satisfiability Again! 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB77191836.735%

문제

Alice recently started to work for a hardware design company and as a part of her job, she needs to identify defects in fabricated integrated circuits. An approach for identifying these defects boils down to solving a satisfiability instance. She needs your help to write a program to do this task.

입력

The first line of input contains a single integer, not more than 5, indicating the number of test cases to follow. The first line of each test case contains two integers n and m where 1 ≤ n ≤ 20 indicates the number of variables and 1 ≤ m ≤ 100 indicates the number of clauses. Then, m lines follow corresponding to each clause. Each clause is a disjunction of literals in the form Xi or ∼Xi for some 1 ≤ i ≤ n, where ∼Xi indicates the negation of the literal Xi. The “or” operator is denoted by a ‘v’ character and is seperated from literals with a single space.

출력

For each test case, display satisfiable on a single line if there is a satisfiable assignment; otherwise display unsatisfiable.

제한

예제 입력 1

2
3 3
X1 v X2
~X1
~X2 v X3
3 5
X1 v X2 v X3
X1 v ~X2
X2 v ~X3
X3 v ~X1
~X1 v ~X2 v ~X3

예제 출력 1

satisfiable
unsatisfiable

힌트

출처

ICPC > Regionals > North America > Rocky Mountain Regional > 2014 Rocky Mountain Regional Contest J번

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

출처

대학교 대회

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

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