結果
問題 |
No.532 Possible or Impossible
|
ユーザー |
![]() |
提出日時 | 2017-08-27 18:01:57 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 914 bytes |
コンパイル時間 | 1,839 ms |
コンパイル使用メモリ | 157,560 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 06:55:19 |
合計ジャッジ時間 | 2,261 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 18 WA * 5 |
ソースコード
#include<bits/stdc++.h> using namespace std; typedef pair<int,int> P; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; #define pb push_back #define mp make_pair #define eps 1e-9 #define INF 2000000000 #define sz(x) ((int)(x).size()) #define fi first #define sec second #define all(x) (x).begin(),(x).end() #define sq(x) ((x)*(x)) #define rep(i,n) for(int (i)=0;(i)<(int)(n);(i)++) #define repn(i,a,n) for(int (i)=(a);(i)<(int)(n);(i)++) #define EQ(a,b) (abs((a)-(b))<eps) template<class T> void chmin(T& a,const T& b){if(a>b)a=b;} template<class T> void chmax(T& a,const T& b){if(a<b)a=b;} int N,M; int main(){ cin >> N >> M; if(N==1){ cout << "Impossible" << endl; return 0; } for(int i=1;i<=N;i++){ if(i==M)continue; for(int j=i+1;j<=N;j++){ if(j==M)continue; if(i+j!=M){ cout << "Possible" << endl; return 0; } } } cout << "Impossible" << endl; return 0; }