Submission #19723256
Source Code Expand
Copy
#include<bits/stdc++.h> using namespace std; map<string,int> mp; int main() { int n; cin>>n; string s; for(int i=1;i<=n;i++) { cin>>s; mp[s]++; } map<string,int>::iterator iter; iter=mp.begin(); for(iter=mp.begin();iter!=mp.end();iter++) { string t=iter->first; string tt='!'+t; if(mp[t]>0&&mp[tt]>0) { cout<<t; return 0; } } cout<<"satisfiable"; }
Submission Info
Submission Time | |
---|---|
Task | C - 1-SAT |
User | jiguangleida |
Language | C++ (GCC 9.2.1) |
Score | 300 |
Code Size | 443 Byte |
Status | AC |
Exec Time | 279 ms |
Memory | 34752 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 300 / 300 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | 01_small.txt, 02_small.txt, 03_small.txt, 04_small.txt, 05_small.txt, 06_small.txt, 07_small.txt, 08_small.txt, 09_small.txt, 10_small.txt, 11_small.txt, 12_small.txt, 13_small.txt, 14_small.txt, 15_small.txt, 16_satisfiable1.txt, 17_satisfiable2.txt, 18_unsatisfiable1.txt, 19_unsatisfiable1.txt, 20_unsatisfiable1.txt, 21_unsatisfiable1.txt, 22_unsatisfiable1.txt, 23_unsatisfiable1.txt, 24_unsatisfiable1.txt, 25_unsatisfiable1.txt, 26_unsatisfiable2.txt, 27_unsatisfiable2.txt, 28_same.txt, sample_01.txt, sample_02.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01_small.txt | AC | 8 ms | 3488 KB |
02_small.txt | AC | 4 ms | 3560 KB |
03_small.txt | AC | 3 ms | 3596 KB |
04_small.txt | AC | 3 ms | 3492 KB |
05_small.txt | AC | 2 ms | 3496 KB |
06_small.txt | AC | 2 ms | 3560 KB |
07_small.txt | AC | 2 ms | 3640 KB |
08_small.txt | AC | 2 ms | 3584 KB |
09_small.txt | AC | 2 ms | 3484 KB |
10_small.txt | AC | 2 ms | 3640 KB |
11_small.txt | AC | 2 ms | 3484 KB |
12_small.txt | AC | 2 ms | 3556 KB |
13_small.txt | AC | 2 ms | 3500 KB |
14_small.txt | AC | 2 ms | 3640 KB |
15_small.txt | AC | 2 ms | 3628 KB |
16_satisfiable1.txt | AC | 279 ms | 34752 KB |
17_satisfiable2.txt | AC | 110 ms | 6664 KB |
18_unsatisfiable1.txt | AC | 259 ms | 32508 KB |
19_unsatisfiable1.txt | AC | 246 ms | 30672 KB |
20_unsatisfiable1.txt | AC | 229 ms | 27556 KB |
21_unsatisfiable1.txt | AC | 226 ms | 28336 KB |
22_unsatisfiable1.txt | AC | 219 ms | 27260 KB |
23_unsatisfiable1.txt | AC | 217 ms | 27588 KB |
24_unsatisfiable1.txt | AC | 214 ms | 27128 KB |
25_unsatisfiable1.txt | AC | 226 ms | 27064 KB |
26_unsatisfiable2.txt | AC | 106 ms | 6252 KB |
27_unsatisfiable2.txt | AC | 105 ms | 5948 KB |
28_same.txt | AC | 58 ms | 3436 KB |
sample_01.txt | AC | 3 ms | 3636 KB |
sample_02.txt | AC | 2 ms | 3500 KB |