結果
問題 |
No.1377 Half xor Half
|
ユーザー |
![]() |
提出日時 | 2021-02-05 22:08:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 478 bytes |
コンパイル時間 | 1,367 ms |
コンパイル使用メモリ | 165,972 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-02 12:37:04 |
合計ジャッジ時間 | 8,322 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 1 RE * 1 |
other | WA * 41 RE * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ int N; cin >> N; string S; cin >> S; string T; cin >> T; bool ok = true; for (int i = 0; i < N; i++){ bool s = false, t = false; if (S[i] == '0' && S[N + i] == '0'){ s = true; } if (T[i] == '0' && T[N + i] == '0'){ t = true; } if (s ^ t){ ok = false; assert(false); cout << -1 << endl; break; } } if (!ok){ cout << -1 << endl; } }