結果

問題 No.441 和か積
ユーザー HIBIKU
提出日時 2017-03-11 18:52:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 1,064 bytes
コンパイル時間 833 ms
コンパイル使用メモリ 97,832 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-24 12:34:32
合計ジャッジ時間 1,812 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 12 WA * 18
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:45:18: warning: 'p' may be used uninitialized [-Wmaybe-uninitialized]
   45 |         if(a>0) p++;
      |                 ~^~
main.cpp:43:23: note: 'p' was declared here
   43 |         long long a,b,p;
      |                       ^

ソースコード

diff #

#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <limits>
#include <tuple>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <string>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define llong long long
#define pb(a) push_back(a)
#define INF 999999999
using namespace std;
typedef pair<int, int> P;
typedef pair<llong, llong> LP;
typedef pair<int, P> PP;
typedef pair<llong, LP> LPP;
int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };



int main(){
	long long a,b,p;
	cin>>a>>b;
	if(a>0) p++;
	if(b>0) p++;
	if(p==2||p==0) cout<<"P"<<endl;
	else cout<<"S"<<endl;
	return 0;
}

0