結果

問題 No.532 Possible or Impossible
ユーザー hiyokko2hiyokko2
提出日時 2017-06-23 23:42:28
言語 C++11
(gcc 11.4.0)
結果
RE  
実行時間 -
コード長 1,050 bytes
コンパイル時間 1,727 ms
コンパイル使用メモリ 143,280 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-07-26 16:58:07
合計ジャッジ時間 3,716 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 1 ms
4,376 KB
testcase_02 RE -
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,384 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 WA -
testcase_10 AC 2 ms
4,380 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 2 ms
4,380 KB
testcase_14 RE -
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,376 KB
testcase_19 RE -
testcase_20 AC 2 ms
4,380 KB
testcase_21 AC 1 ms
4,376 KB
testcase_22 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 long
using 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 << "Impossible" << 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;
        }
    }
}
0