結果
問題 | No.2525 Great Move |
ユーザー |
|
提出日時 | 2024-05-29 12:53:06 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 1,154 bytes |
コンパイル時間 | 1,245 ms |
コンパイル使用メモリ | 106,504 KB |
最終ジャッジ日時 | 2025-02-21 17:07:28 |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
#define _USE_MATH_DEFINES #include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include <string> #include<math.h> #include<iomanip> #include<stdio.h> #include <stdlib.h> #include<stdio.h> #include <queue> #include<map> #include <sstream> #include<set> #include<stack> #include<time.h> #include <sys/types.h> #include <tuple> typedef long long int ll; //#include<bits/stdc++.h> using namespace std; int main() { int Q; Q = 1; //cin >> Q; deque<pair<ll,ll>>d; while (Q--) { string a, b; cin >> a >> b; int x = 0; if (a[0] == '-') { int t = a[a.size() - 1] - '0'; if (t % 2)x = -1; } else { int t = a[a.size() - 1] - '0'; if (t % 2)x = 1; } int y = 0; if (b[0] == '-') { int t = b[b.size() - 1] - '0'; if (t % 2)y = -1; } else { int t = b[b.size() - 1] - '0'; if (t % 2)y = 1; } if ((x + y) % 2)cout << "Impossible"; else cout << "Possible"; } return 0; }