結果
問題 |
No.441 和か積
|
ユーザー |
![]() |
提出日時 | 2016-07-18 19:20:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 969 bytes |
コンパイル時間 | 1,657 ms |
コンパイル使用メモリ | 166,156 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 03:04:29 |
合計ジャッジ時間 | 2,729 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 30 |
ソースコード
#include <bits/stdc++.h> using namespace std; // #define int long long // <-----!!!!!!!!!!!!!!!!!!! #define rep(i,n) for (int i=0;i<(n);i++) #define rep2(i,a,b) for (int i=(a);i<(b);i++) #define rrep(i,n) for (int i=(n)-1;i>=0;i--) #define rrep2(i,a,b) for (int i=(b)-1;i>=(a);i--) #define all(a) (a).begin(),(a).end() typedef long long ll; typedef pair<int, int> Pii; typedef tuple<int, int, int> TUPLE; typedef vector<int> V; typedef vector<V> VV; typedef vector<VV> VVV; typedef vector<vector<int>> Graph; const int inf = 1e9; const int mod = 1e9 + 7; signed main() { std::ios::sync_with_stdio(false); std::cin.tie(0); string a, b; cin >> a >> b; // ab - (a + b) = (a - 1)(b - 1) - 1 の符号で場合分け if ((a == "0" && b == "0") || (a == "2" && b == "2")) { cout << "E" << endl; } else if (a == "0" || b == "0" || a == "1" || b == "1") { cout << "S" << endl; } else { cout << "P" << endl; } }