結果
| 問題 |
No.532 Possible or Impossible
|
| コンテスト | |
| ユーザー |
e869120
|
| 提出日時 | 2017-06-23 22:30:41 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 366 bytes |
| コンパイル時間 | 732 ms |
| コンパイル使用メモリ | 78,100 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-02 14:42:41 |
| 合計ジャッジ時間 | 1,468 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
ソースコード
#include<iostream>
#include<algorithm>
#include<string>
#include<vector>
#include<queue>
#include<cmath>
#include<functional>
using namespace std;
int n, m;
int main() {
cin >> n >> m;
if (n*(n + 1) / 2 < m)cout << "Impossible" << endl;
else if ((n == 1 && m == 0) || (n == 2 && m == 0))cout << "Impossible" << endl;
else cout << "Possible" << endl;
return 0;
}
e869120