結果

問題 No.532 Possible or Impossible
ユーザー hiyokko2hiyokko2
提出日時 2017-06-23 23:36:39
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,023 bytes
コンパイル時間 1,262 ms
コンパイル使用メモリ 158,392 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-14 06:30:03
合計ジャッジ時間 2,183 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 1 ms
6,944 KB
testcase_09 WA -
testcase_10 AC 1 ms
6,940 KB
testcase_11 AC 2 ms
6,944 KB
testcase_12 AC 2 ms
6,940 KB
testcase_13 WA -
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 2 ms
6,944 KB
testcase_16 AC 2 ms
6,944 KB
testcase_17 WA -
testcase_18 AC 2 ms
6,944 KB
testcase_19 AC 2 ms
6,944 KB
testcase_20 AC 2 ms
6,940 KB
testcase_21 AC 2 ms
6,940 KB
testcase_22 AC 2 ms
6,944 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 << "Impossible" << endl;
        } else {
            cout << "Possible" << endl;
        }
    } 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