結果

問題 No.643 Two Operations No.2
ユーザー noshi91noshi91
提出日時 2018-02-02 21:30:36
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 746 bytes
コンパイル時間 709 ms
コンパイル使用メモリ 73,096 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-31 07:11:37
合計ジャッジ時間 1,418 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <array>
#include <cstdint>
#include <climits>
#include <functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string>
#include <time.h>
#include <utility>
#include <vector>

using int32 = std::int_fast32_t;
using int64 = std::int_fast64_t;
using uint32 = std::uint_fast32_t;
using uint64 = std::uint_fast64_t;



int main(void) {
	std::ios::sync_with_stdio(false);
	std::cin.tie(0);
	int32 x, y;
	std::cin >> x >> y;
	int32 ans;
	if (x == y) {
		ans = 0;
	}
	else if (x == 0) {
		ans = 2;
	}
	else if (y == 0) {
		ans = 1;
	}
	else if (x + y == 0) {
		ans = 3;
	}
	else {
		ans = -1;
	}
	std::cout << ans << "\n";
	return 0;
}
0