結果
| 問題 |
No.383 レーティング
|
| コンテスト | |
| ユーザー |
bkaclub
|
| 提出日時 | 2016-07-01 22:24:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 793 bytes |
| コンパイル時間 | 594 ms |
| コンパイル使用メモリ | 71,972 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-12 00:35:15 |
| 合計ジャッジ時間 | 1,183 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:31:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
31 | scanf("%d%d",&a,&b);
| ~~~~~^~~~~~~~~~~~~~
ソースコード
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <cassert>
using namespace std;
#define all(c) (c).begin(), (c).end()
#define iter(c) __typeof((c).begin())
#define cpresent(c, e) (find(all(c), (e)) != (c).end())
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define tr(c, i) for (iter(c) i = (c).begin(); i != (c).end(); ++i)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
typedef long long ll;
int main(){
int a,b;
scanf("%d%d",&a,&b);
if(b==a) printf("0\n");
else if(b>a) printf("+%d\n", b-a);
else if(b<a) printf("-%d\n", a-b);
return 0;
}
bkaclub