結果
問題 | No.532 Possible or Impossible |
ユーザー |
![]() |
提出日時 | 2017-06-23 23:44:02 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 1,048 bytes |
コンパイル時間 | 1,192 ms |
コンパイル使用メモリ | 158,900 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-03 03:50:54 |
合計ジャッジ時間 | 1,923 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 23 |
ソースコード
#include <bits/stdc++.h>#include <assert.h>#define FOR(i,bg,ed) for(ll i=(bg);i<(ed);i++)#define REP(i,n) FOR(i,0,n)#define MOD 1000000007//#define int long longusing namespace std;typedef long long ll;typedef vector<int> V;typedef vector<V> VV;const int INF = 1e9;signed main(){int N, M;cin >> N >> M;if (N > 3) {if (M > 3) {cout << "Possible" << endl;} else if (M == 0) {cout << "Possible" << endl;} else {cout << "Possible" << endl;//assert(false);}} else if (N == 3) {if (M == 2) {cout << "Possible" << endl;} else {cout << "Possible" << endl;}} else if (N == 2) {if (M == 0) {cout << "Impossible" << endl;} else {cout << "Possible" << endl;}} else if (N == 1) {if (M == 0) {cout << "Impossible" << endl;} else {cout << "Possible" << endl;}}}