結果
問題 | No.2323 Nafmo、A+Bをする |
ユーザー |
![]() |
提出日時 | 2023-05-28 13:34:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 592 bytes |
コンパイル時間 | 1,800 ms |
コンパイル使用メモリ | 167,568 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 20:56:36 |
合計ジャッジ時間 | 3,030 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 |
ソースコード
#include<bits/stdc++.h>#define chmin(x,y) (x) = min((x),(y))#define chmax(x,y) (x) = max((x),(y))using namespace std;using ll = long long;const ll mod = 998244353;const vector<int> dx = {1,0,-1,0}, dy = {0,1,0,-1};using Graph = vector<vector<int>>;int main(){// inputstring a,b; cin >> a >> b;// reverse(a.begin(),a.end());// reverse(b.begin(),b.end());int A = 0, B = 0;for (int i=0; i < a.size(); i++){A = 2 * A + (a[i] == '1');}for (int i=0; i < b.size(); i++){B = 2 * B + (b[i] == '1');}cout << (A^B) << endl;// solve// output}