| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1168201 | Jawad_Akbar_JJ | 새로운 문제 (POI13_spa) | C++20 | 819 ms | 327680 KiB |
#include <iostream>
#include <map>
using namespace std;
#define int long long
int X, Y;
map<int,int> seen;
int get(int n, int inp = 0){
while (n--){
char c;
cin>>c;
inp = inp * 2 + c - '0';
}
return inp;
}
void dfs(int n, int x){
if (x == Y){
cout<<"TAK\n";
exit(0);
}
if (seen[x])
return;
seen[x] = 1;
for (int i=0;i<n;i++)
dfs(n, x ^ (1<<i));
}
signed main(){
ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
int n, k;
cin>>n>>k;
X = get(n), Y = get(n);
for (int i=1;i<=k;i++)
seen[get(n)] = 1;
dfs(n, X);
cout<<"NIE\n";
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
